Skip to main content

CheckButton.AllowAllUnchecked Property

Gets or sets whether a checked button that belongs to a logical group can be unchecked.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v25.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(false)]
[DXCategory("Behavior")]
public virtual bool AllowAllUnchecked { get; set; }

Property Value

Type Default Description
Boolean false

true if a checked button in a logical group can be unchecked; false if a checked button cannot be unchecked. The default value is false.

Remarks

Clicking a checked button in a group has no effect (default behavior). Set AllowAllUnchecked to true to allow users to uncheck the currently checked button.

Buttons belong to the same group when they share the same CheckButton.GroupIndex value.

The following code snippet creates two groups. Users can uncheck the checked button in the first group.

// Group 0: allow unchecking
checkButtonYes.GroupIndex = 0;
checkButtonYes.AllowAllUnchecked = true;
checkButtonNo.GroupIndex = 0;
checkButtonNo.AllowAllUnchecked = true;

// Group 1: exclusive behavior
checkButtonSmall.GroupIndex = 1;
checkButtonMedium.GroupIndex = 1;
checkButtonLarge.GroupIndex = 1;
See Also