Situation
You work on WPF bindings, for example a binding to a DateTime object.
Problem
The DateTime object is displayed in en-US culture format.
Solution
Set the current culture on the root element, which is most probably the outer most Grid element, of your XAML.
For example: Set the culture in the corresponding ViewModel constructor (in a MVVM architecture):
this.View.MainGrid.Language = XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag);
Sources
Leave a Reply