How can i obtain currency formatting according to my country i.e indian rupee, INR or Rs ??
Please tell me the way to achieve this ?? Right now when i use StringFormat="{}{0:C}", "$" is being used
I have gone through this link and i am able to achieve the desired result but i am worried about using this in my project. Is this code safe ??
What does this line mean in the above link "when you test functionality related to settings change it’s important you start the program directly from a folder window, if you run it from within Visual Studio or any other program you may get incorrect results."
You can specify the culture in your binding like this:
TextBlock Text="{Binding Value, StringFormat=C, ConverterCulture=nl-BE}"
nl-BE is belgian culture, you can exchange it with Indian culture info, I don't know that ;-)
Or you can set your current thread to the right culture, so you will use it everywhere in your application:
Thread.CurrentThread.CurrentUICulture = new CultureInfo("hi-IN");
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