Toggle switch

Note  Pre-Release Content: This topic is currently being adapted to apply to both Windows 8.1 and Windows Phone (code-named "Blue"). To view the Windows 8.1 version of this topic, click here.

A sample of what a standard toggle switch control looks like

Control description

The toggle switch mimics a physical switch that allows users to turn things on or off. The control has two states: on (checked is true) and off (checked is false).

Usage guidance

Use a toggle switch for binary operations that become effective immediately after the user changes it. For example, use a toggle switch to turn services or hardware components on or off. A good way to test whether you should use a toggle switch is to think about whether you would use a physical switch to perform the action in your context. After the user toggles the switch on or off, you perform the corresponding action immediately.

Examples

A screenshot that illustrates the standard toogle switch control

WinJS.UI.ToggleSwitch object

ToggleSwitch class