ToggleSwitch Class

Represents a toggle switch.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v20.1.dll

Declaration

public class ToggleSwitch :
    ToggleStateButton
Public Class ToggleSwitch
    Inherits ToggleStateButton

Remarks

The ToggleSwitch control consists of a toggle switch and a content area.

ToggleSwitch visual elements

Content

The ToggleSwitch's content is specified by the ToggleSwitch.CheckedStateContent and ToggleSwitch.UncheckedStateContent properties. The ToggleSwitch.ContentPlacement property specifies the position of the content area within the control.

ToggleSwitch State

The ToggleSwitch control supports three states (checked, unchecked and indeterminate) if its ToggleSwitch.IsThreeState property is set to true. Otherwise, the control works with the checked and unchecked states only.

The ToggleSwitch.IsChecked property specifies the editor's state. The toggle switch editor fires the following events when its state changes.

Optional Toggle Flip Animation

Set the ToggleSwitch.EnableAnimation property to false to disable toggle flip animation.

NOTE

The ToggleSwitch control is designed to be used in standalone mode.

The ToggleSwitchEdit control is designed to be used in templates (for example, in the GridControl's CellTemplate), and it uses the ToggleSwitch control inside. You can also use the ToggleSwitchEdit control as a standalone control.

See Also