Silverlight string localization issue

I have a strange problem in silverlight. I use the following XAML to associate the contents of a label with a double property in my view model.

Content="{Binding FeePeriodActual, Mode=OneWay,StringFormat=\{0:c\}}"

However, the display line always displays the dollar symbol of the dollar, not Β£. This is the same on the production server and dev machine. All localization properties are set directly on the web server (s). I do not see where to change it in the silverlight application.

Does anyone have any ideas?

+3
source share
1 answer

Change the method Application_Startupin App.xaml.cs so that it looks like this: -

private void Application_Startup(object sender, StartupEventArgs e)
{
  Resources.Add("DefaultCulture", System.Globalization.CultureInfo.CurrentCulture);

  this.RootVisual = new MainPage();
}

, , : -

Content="{Binding FeePeriodActual, Mode=OneWay,StringFormat=\{0:c\}, ConverterCulture={StaticResource DefaultCulture}}"
+2

Source: https://habr.com/ru/post/1757691/


All Articles