Skip to main content

BaseCheckEdit.Toggle() Method

Changes the state of a check editor.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

public virtual void Toggle()

Remarks

The Toggle method is used to toggle the states of a check editor.

The CheckEdit control supports two or three check states. If the control’s RepositoryItemCheckEdit.AllowGrayed property is set to false (the default behavior), the method toggles checked and unchecked states only. You can read the CheckEdit.Checked or the CheckEdit.CheckState property to get the current state of your check editor.

When the RepositoryItemCheckEdit.AllowGrayed property is true, successive calls to the Toggle method select the unchecked, checked and grayed states. In this case,the check editor’s current state can be obtained via the CheckState property.

For the ToggleSwitch control, which supports only two states, the Toggle method toggles checked and unchecked states.

See Also