I have an odd problem in silverlight. I use the following XAML to bind the content of a label to a double property in my viewmodel.
Content="{Binding FeePeriodActual, Mode=OneWay,StringFormat=\{0:c\}}"
However, the display string always shows the $ Dollar Currency symbol rather than the the £. This is the same on the production server and the dev machine. All localisation properties are set right on the webserver(s). I can't see where to change it in the silverlight app.
Anyone got any ideas?
Modify the Application_Startup method in App.xaml.cs to look like this:-
private void Application_Startup(object sender, StartupEventArgs e)
{
Resources.Add("DefaultCulture", System.Globalization.CultureInfo.CurrentCulture);
this.RootVisual = new MainPage();
}
Now where you need culture specific formatting in bindings use:-
Content="{Binding FeePeriodActual, Mode=OneWay,StringFormat=\{0:c\}, ConverterCulture={StaticResource DefaultCulture}}"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With