O'Reilly logo

XAML Unleashed by Adam Nathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

ToggleSwitch

Logically, ToggleSwitch is like a ToggleButton or its more well-known derived CheckBox control, just with a different default appearance that makes it look like a light switch, and with support for only two states (no indeterminate state). Figure 14.15 shows a simple ToggleSwitch with no properties set. The user can turn a ToggleSwitch on and off by tapping it or dragging the thumb.

Image

FIGURE 14.15 The ToggleSwitch is like a light switch that can be on or off.

ToggleSwitch exposes a Boolean IsOn property and raises a simple Toggled event when the value of IsOn changes.

ToggleSwitch has a standard Header property, and you can customize ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required