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, ...
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.