Skip to main content

BaseGallery.ItemCheckMode Property

Gets or sets whether item checking (selection) is enabled, and how the items can be checked (selected).

Namespace: DevExpress.XtraBars.Ribbon.Gallery

Assembly: DevExpress.XtraBars.v24.1.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(ItemCheckMode.None)]
[DXCategory("Appearance")]
public virtual ItemCheckMode ItemCheckMode { get; set; }

Property Value

Type Default Description
ItemCheckMode None

A ItemCheckMode value.

Available values:

Name Description
None

An item is not automatically checked on clicking.

SingleCheck

Only a single item can be checked throughout the gallery. When checking another item, the previously checked item is unchecked.

A checked item can be unchecked when clicking on it again.

SingleRadio

The same as the ItemCheckMode.SingleCheck option, except the following:

A checked item is NOT unchecked when clicking on it again.

Multiple

Multiple items can be checked , by clicking them while holding the CTRL/SHIFT key.

SingleCheckInGroup

An end-user can check a single item within each group. When checking another item, the previously checked item in the same group is unchecked.

A checked item can be unchecked when clicking on it again.

SingleRadioInGroup

The same as the ItemCheckMode.SingleCheckInGroup option, except the following:

A checked item is NOT unchecked when clicking on it again.

MultipleInGroup

Multiple items can be checked, but only within a single group. Checking any item within another group, unchecks items in the previous group.

To select multiple items, click them while holding the CTRL/SHIFT key.

Remarks

The ItemCheckMode property allows the item checking feature to be enabled. If this property is set to None, automatic item checking is disabled.

When the checking feature is activated, items are automatically checked/selected on clicking them. In specific modes, multiple items can be checked simultaneously, by clicking them while holding the CTRL or SHIFT key.

Whenever an item’s check state (GalleryItem.Checked) is changed, the BaseGallery.ItemCheckedChanged event fires. To get all checked items, use the BaseGallery.GetCheckedItems method.

If you need to implement manual item checking, set the ItemCheckMode property to None, and handle the BaseGallery.ItemClick event. In this event, you can manipulate an item’s check state via the GalleryItem.Checked property.

To allow items to be checked (selected) by mouse dragging, use BaseGallery.AllowMarqueeSelection.

See Also