Skip to main content
A newer version of this page is available. .

ToggleSwitch.IsOn Property

Gets or sets the control’s check state.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.2.dll

Declaration

[DXCategory("Appearance")]
[DefaultValue(false)]
public bool IsOn { get; set; }

Property Value

Type Default Description
Boolean **false**

true, if the control is checked; otherwise, false.

Remarks

In the checked and unchecked states, the control displays text specified by the RepositoryItemToggleSwitch.OnText and RepositoryItemToggleSwitch.OffText properties, respectively. These properties are accessible via the ToggleSwitch.Properties object.

You can toggle the control’s check state via the ToggleSwitch.Toggle method.

The IsOn property is synchronized with the control’s ToggleSwitch.EditValue property.

The following code snippets (auto-collected from DevExpress Examples) contain references to the IsOn 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.

See Also