Fork me on GitHub

ToggleSwitch

The ToggleSwitch control originally appeared in Windows Phone 7, but has made its way into Windows 8. The MahApps.Metro version of this control uses the Windows Phone 7 code (ported), but the Windows 8 visuals.

The function is very similar to that of a checkbox, but easier to differentiate and easier to use with touch interfaces. Basically though, it can be thought of as a pretty CheckBox:

<Controls:ToggleSwitch Header="WiFi rest state" />

You can bind to/set IsChecked to switch between the two states. You can change the on and off labels by setting

<Controls:ToggleSwitch OnLabel="Yes" OffLabel="No" />