Running MVVMExample, labels that are bound to the view models using LocalizationBinding do not switch languages.
Notice "Last Name" and "Age" do not update when language is switched, while elements directly connected to ResourceKeys do.
I did some poking around in the source to see if I could fix the issue, but didn't find anything obvious.
For anyone else that runs into this problem:
Simply attach to the ResourceDisctionaryChangedEvent in your ViewModel and fire NotifyPropertyChanged to update properties.
More or less this:
var glApp = CommonUI.App.Current as GlobalizedApplication;
glApp.GlobalizationManager.ResourceDictionaryChangedEvent += (source, args) =>
{
NotifyPropertyChanged(string.Empty);
};
Running MVVMExample, labels that are bound to the view models using LocalizationBinding do not switch languages.
Notice "Last Name" and "Age" do not update when language is switched, while elements directly connected to ResourceKeys do.
I did some poking around in the source to see if I could fix the issue, but didn't find anything obvious.
For anyone else that runs into this problem:
Simply attach to the
ResourceDisctionaryChangedEventin your ViewModel and fireNotifyPropertyChangedto update properties.More or less this: