MahApps.Metro by Paul Jenkins; Jake Ginnivan; Brendan Forster (shiftkey); Alex Mitchell (Amrykid); Dennis Daume (flagbug); Jan Karger (punker76)

<PackageReference Include="MahApps.Metro" Version="1.1.1" />

.NET API 905,312 bytes

 ToggleSwitch

public class ToggleSwitch : ContentControl
A control that allows the user to toggle between two states: One represents true; The other represents false.

public static readonly DependencyProperty HeaderProperty

public static readonly DependencyProperty IsCheckedProperty

public static readonly DependencyProperty OffLabelProperty

public static readonly DependencyProperty OnLabelProperty

public FlowDirection ContentDirection { get; set; }

Gets/sets the control's content flow direction.

public object Header { get; set; }

Gets/sets the header to display on top of the control.

public DataTemplate HeaderTemplate { get; set; }

Gets/sets the data template used to display the header on the top of the control.

public bool? IsChecked { get; set; }

Gets/sets whether the control is Checked (On) or not (Off).

public string OffLabel { get; set; }

Gets/sets the text to display when the control is in it's Off state.

public string OnLabel { get; set; }

Gets/sets the text to display when the control is in it's On state.

public Brush SwitchForeground { get; set; }

Gets/sets the brush used for the switch's foreground.

An event that is raised when the value of IsChecked changes.

public ToggleSwitch()