I need to set the culture to german while keeping the US number format. Therefore, I'm setting
var culture = new System.Globalization.CultureInfo("de-DE");
var usCulture = new System.Globalization.CultureInfo("en-US");
culture.NumberFormat = usCulture.NumberFormat;
CultureManager.UICulture = culture;
The CultureManager is from Infralution and enables the switching of languages on the fly. I can verify that the NumberFormat is indeed set to US format with e.g. a "." as decimal seperator after above code. Nevertheless, the following expression
<TextBox Text="{Binding MyDoubleVariable, StringFormat={}{0:0.#}}"/>
where MyDoubleVariable = 2.13
is displayed as 2,13
. Where's my mistake? How can I retain the US format?