I'm experiencing a weird format with currency issue when using data-binding on windows phone.
I have checked the CultureInfo.CurrentCulture.NumberFormat.CurrencySymbol
and this is £
When I do string.Format("{0:C}", 30.30)
it displays correctly also with £30.30
.
So why would the following code produce $30.30
when using data binding?
Binding binding1 = new Binding(somePropertyName);
binding1.StringFormat = "{0:C}";
I am not that familiar with the windows phone SDK, but in WPF the StringFormat of bindings are controlled with the Language property, rather than the current thread culture info. You can set it at the page level and all children will use the same language.
This illustrates how the language property changes the behavior of a binding independent of the current thread: