Class ToggleSwitch
Use ToggleSwitch to present users with two mutally exclusive options (like on/off).
public class ToggleSwitch : ToggleButton, IAnimatable, ISupportInitialize, IFrameworkInputElement, IInputElement, IQueryAmbient, IAddChild, ICommandSource
- Inheritance
-
ToggleSwitch
- Implements
- Inherited Members
Fields
LabelPositionProperty
Identifies the LabelPosition dependency property.
public static readonly DependencyProperty LabelPositionProperty
Field Value
OffContentProperty
Identifies the OffContent dependency property.
public static readonly DependencyProperty OffContentProperty
Field Value
OnContentProperty
Identifies the OnContent dependency property.
public static readonly DependencyProperty OnContentProperty
Field Value
Properties
LabelPosition
Gets or sets the position of the label content relative to the toggle switch.
[Bindable(true)]
public ElementPlacement LabelPosition { get; set; }
Property Value
OffContent
Gets or sets the content that should be displayed when the ToggleSwitch is in the "Off" state.
[Bindable(true)]
public object? OffContent { get; set; }
Property Value
OnContent
Gets or sets the content that should be displayed when the ToggleSwitch is in the "On" state.
[Bindable(true)]
public object? OnContent { get; set; }