Sunday, January 26, 2014

WPF Binding Culture

By default, WPF (as of version 4.0) will do all its bindings using en_us culture. The issue is reported to Microsoft, but is closed as by design. On that page, there are a few workarounds.

The simplest workaround is:


Another workaround is to specify the language of the xaml page by setting the Language property:



This will affect all bindings on that window.

The main drawbacks of this methods are that if the user has made changes to the local culture on his computer, this changes will not be taken care of. The solution to this is to make a completely custom Converter that does all the job.