Hi friends ,
Can you tell me how can I use the Currency Format class which is resides in the Windows.Globalization.NumberFormatting class in Windows Store apps.
So that I can change any number in their currency format. Please also give me an example?
Thanx
Loading

Akkiraju IvaturiPosted Sep 22, 2012, 12:31 AM
// This scenario uses the Windows.Globalization.NumberFormatting.CurrencyFormatter class
// to format a number as a currency.
// Determine the current user's default currency.
var userCurrency = Windows.System.UserProfile.GlobalizationPreferences.currencies;
// Numbers to be formatted.
var wholeNumber = 12345;
var fractionalNumber = 12345.67;
// Currency formatter using the current user's preference settings for number formatting.
var userCurrencyFormat = new Windows.Globalization.NumberFormatting.CurrencyFormatter(userCurrency);
var currencyDefault = userCurrencyFormat.format(fractionalNumber);
// Create a formatter initialized to a specific currency,
// in this case US Dollar (specified as an ISO 4217 code)
// but with the default number formatting for the current user.
var currencyFormatUSD = new
Windows.Globalization.NumberFormatting.CurrencyFormatter("USD");
var currencyUSD = currencyFormatUSD.format(fractionalNumber);
// Create a formatter initialized to a specific currency.
// In this case it's the Euro with the default number formatting for France.
var currencyFormatEuroFR = new Windows.Globalization.NumberFormatting.CurrencyFormatter("EUR", ["fr-FR"], "FR");
var currencyEuroFR = currencyFormatEuroFR.format(fractionalNumber);
// Results for display.
var results = "Fixed number (" + fractionalNumber + ")\n" +
"With user's default currency: " + currencyDefault + "\n" +
"Formatted US Dollar: " + currencyUSD + "\n" +
"Formatted Euro (fr-FR defaults): " + currencyEuroFR;
I have copied this above from the link:
http://msdn.microsoft.com/en-us/library/windows/apps/hh965450.aspx
http://msdn.microsoft.com/library/windows/apps/xaml/windows.globalization.numberformatting.currencyformatter.aspx