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).
ListBox is bound to the viewmodel’s
SupportedCultures property. Selecting a value causes the current thread’s
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 ...