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

Displaying Localized Text and Images Within the LocalizabilityView Page

The view’s XAML file is entirely absent of literal strings. The BindableResources instance is used to retrieve all localized resource strings (see Listing 19.4).

A ListBox is bound to the viewmodel’s SupportedCultures property. Selecting a value causes the current thread’s CurrentCulture and CurrentUICulture to be set to a new CultureInfo instance. The BindableResources.RaisePropertyChanged method is then called to trigger an update of the UI. The NativeName property of the CultureInfo class displays the culture name’s endonym.

The flag image is also bound to the BindableResources. The binding uses the BitmapImageConverter, which was presented earlier in this chapter, to ...

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