private static string FormatCurrency(double price) { var currency = ResourceHelper.ResourceLoader.GetString("Currency"); var currencyFormatter = new Windows.Globalization.NumberFormatting.CurrencyFormatter(currency); var formattedCurrency = currencyFormatter.Format(price); return(formattedCurrency); }
public MainPage() { this.InitializeComponent(); //Get Date time in the format we need var dateTimeFormatter = new Windows.Globalization.DateTimeFormatting.DateTimeFormatter("month day dayofweek year"); dateLbl.Text = dateTimeFormatter.Format(DateTime.Now); //Get currency, get the current user one var userCurrency = Windows.System.UserProfile.GlobalizationPreferences.Currencies; var currencyFormatter = new Windows.Globalization.NumberFormatting.CurrencyFormatter(userCurrency[0]); currencyLbl.Text=currencyFormatter.Format(10.57); }