Gallery.ItemCheckMode Property
Gets or sets whether the item checking feature is enabled, and whether single or multiple items can be checked simultaneouly. This is a dependency property.
Namespace: DevExpress.Xpf.Bars
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Property Value
Type | Description |
---|---|
GalleryItemCheckMode | A GalleryItemCheckMode value that specifies item checking mode. |
Available values:
Name | Description |
---|---|
None | The item checking feature is disabled. |
Single | A single gallery item can be checked within a gallery at one time. Checking another gallery item unchecks the previously checked item. |
Multiple | Multiple items can be checked within a gallery simultaneously. Clicking one item doesn’t uncheck other checked items. |
SingleInGroup | A single gallery item can be checked within each gallery group. |
Remarks
If the ItemCheckMode property is set to GalleryItemCheckMode.None, the item checking feature is disabled. In this mode, a gallery item behaves like a regular button on clicking, where it fires the Click events (GalleryItem.Click and Gallery.ItemClick).
In other modes, the item checking feature is enabled. The items are checked differently in these modes:
GalleryItemCheckMode.Single mode
A single gallery item can be checked within the gallery at one time. Checking another gallery item unchecks the previously checked item.
GalleryItemCheckMode.SingleInGroup mode
A single gallery item can be checked within each gallery group.
GalleryItemCheckMode.Multiple mode
Multiple items can be checked within the gallery simultaneously. Clicking one item doesn’t uncheck other checked items.
To get and set a gallery item’s check state in code, use the GalleryItem.IsChecked property.
When an item is checked, the GalleryItem.Checked and Gallery.ItemChecked events fire. Unchecking the item fires the GalleryItem.Unchecked and Gallery.ItemUnchecked events. To respond to checking and unchecking an item using a single event, use GalleryItem.Click or Gallery.ItemClick.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ItemCheckMode property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.