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

ToggleSwitch Class

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

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v19.1.dll


[SmartTagAction(typeof(ToggleSwitchActions), "On", "Switch On", SmartTagActionType.RefreshContentAfterExecute)]
[SmartTagAction(typeof(ToggleSwitchActions), "Off", "Switch Off", SmartTagActionType.RefreshContentAfterExecute)]
[ToolboxBitmap(typeof(ToolboxIconsRootNS), "ToggleSwitch")]
public class ToggleSwitch :


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


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