WPF XAML StringFormat DateTime: Output in wrong culture?
Please see my answer on StringFomat Localization problem
To apply the solution mentioned at http://tinyurl.com/b2jegna do the following:
(1) Add a Startup event handler to the Application class in app.xaml:
<Application x:Class="MyApp"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
...
Startup="ApplicationStartup">
(2) Add the handler function:
private void ApplicationStartup(object sender, StartupEventArgs e)
{
FrameworkElement.LanguageProperty.OverrideMetadata(
typeof(FrameworkElement),
new FrameworkPropertyMetadata(XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.IetfLanguageTag)));
}
WPF strings should then be formatted correctly according to culture.