I am working with an object that handles localized strings. The object type (LocalizedString) provides the correct localized string in its ToString() method.
I have a view model that exposes a property of type LocalizedString. When my current thread and ui culture is changed, I raise the property changed event for this property, however the strings in the UI do not get updated.
I narrowed it down some to discover that it stops working after the value has been read from the property once. If instead of just raising property changed when the culture changes I do this:
LocalizedString temp = MyProperty;
MyProperty = null;
MyProperty = temp; // <-- property changed gets raised in the setter
It seems to work. The only difference is that the LocalizedString object instance changed.
Basically I believe what happens is this: The dependency property (TextBlock.Text in this case) gets notified that the bound value has changed. It goes and retrieves the property value (LocalizedString object),
does a comparison and sees that the previous value and the new value are the same object instance, and stops - does not refresh the
View Complete Post