Microsoft recommends using Windows.Globalization rather than System.Globalization for UWP apps (Use global-ready formats).
Under Windows.Globalization.NumberFormatting Namespace there is a CurrencyFormatter Class but I do not want to format a number as currency. I want to find how to get the currency symbol only.
What is current best practice for returning the currency symbol for the current user in UWP?
You can use the NumberFormatInfo.CurrencySymbol
property for that:
string currencySymbol = NumberFormatInfo.CurrentInfo.CurrencySymbol;
As far as I know there is no direct property to get that, but you can use this small trick:
var currencyInUse = new Windows.Globalization.GeographicRegion().CurrenciesInUse[0];
var currencyFormatter = new Windows.Globalization.NumberFormatting.CurrencyFormatter(currencyInUse) { IsDecimalPointAlwaysDisplayed = false, FractionDigits = 0 };
var currencySymbol = currencyFormatter.Format(0).Replace("0", "");