December 2013
Intermediate to advanced
480 pages
14h 11m
English
You can detect whether a ToggleSwitch control is in a checked or unchecked state by reading the ToggleSwitch control’s checked property. For example, the page in Listing 4.5 contains a ToggleSwitch control and a DIV element that displays different messages depending on the state of the ToggleSwitch control (see Figure 4.9).
FIGURE 4.9 Displaying a message depending on the state of a ToggleSwitch
LISTING 4.5 Using a ToggleSwitch Control (toggleSwitchChecked\toggleSwitchChecked.html)
<div id="togFlux" data-win-control="WinJS.UI.ToggleSwitch" data-win-options="{ ...
Read now
Unlock full access