O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

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

Localizing the ToggleSwitch

Unlike controls located in the FCL, the Toolkit does not ship with localized resources. In the case of the ToggleSwitch, it is something to be mindful of because of the default Header values: Off and On, which must be localized if you want to support other languages.

You could take the Toolkit source code and provide a localized resource dictionary for each language you want to support. This, however, would leave you having to update each new version of the Toolkit with your custom dictionaries—not the best approach.

An alternative approach is to use a custom IValueConverter to populate the Content property of the ToggleSwitch based on the value of its IsChecked property. Depending on the value of its IsChecked property, ...

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