How to change active culture on Windows Phone 7

Posted by Sam on Stack Overflow See other posts from Stack Overflow or by Sam
Published on 2010-10-28T13:47:07Z Indexed on 2011/03/06 16:10 UTC
Read the original article Hit count: 157

[Update] I see I need the full example to explain.

In my Windows Phone 7 App, I got a page containing a TextBox bound to a Decimal "Amount":

<TextBox Text="{Binding Amount,Mode=TwoWay}" InputScope="CurrencyAmount"/>

The phone settings are set to German. In german localization, a value like 1234.56m would be formatted 1.234,56 (unlike the US, where it should be 1,234.56).

Problem is, when I enter a value like 1.234,56 in the textbox, the content will be interpreted for US, resulting in 1.23456m, when it should have been 1234.56m.

So, how do I get the binding on the WP7 to use the current phone culture instead of a generic US one? In Germany people expect to enter a colon for decimals instead of a dot.

© Stack Overflow or respective owner

Related posts about windows-phone-7

Related posts about globalization