Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

BaseCheckEdit.Toggle() Method

In This Article

Changes the state of a check editor.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v24.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