ToggleSwitch Class

The check editor to edit Boolean values using a movable bar.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[DefaultBindingPropertyEx("IsOn")]
public class ToggleSwitch :
    BaseCheckEdit
<DefaultBindingPropertyEx("IsOn")>
Public Class ToggleSwitch
    Inherits BaseCheckEdit

Remarks

The ToggleSwitch is a Windows UI-style check editor that allows an end-user to switch between two states (On and Off).

ToggleSwitch.png

The editor's state is specified by the ToggleSwitch.IsOn property. The ToggleSwitch.Toggle method inverts the current state.

The text displayed by the editor in the checked and unchecked states is specified by the RepositoryItemToggleSwitch.OnText and RepositoryItemToggleSwitch.OffText properties, available via the ToggleSwitch.Properties object. To hide the text, use the RepositoryItemToggleSwitch.ShowText property.

See Also