Hi,
I have a little problem with the current format of my negative currency number. Here's a screenshot resuming my situation.
- This is how I'm using the StringFormat in my binding. (BTW, I tried only {0:C})
- As expected
- The current settings of my computer for the negative currency number 4.
- The result when I'm running my application
Why the result isn't -0,08 $ ?
Any ideas of how I should proceed?
Thanks for your time.
UPDATE:
I tried to resolve the problem with a converter, here's the result :
- I found that the
Thread.CurrentThread.CurrentUICulture
was not the same as theThread.CurrentThread.CurrentCulture
, so I fixed it in my App.xaml.cs. Unfortunately, same result. - I tried to display my values through a converter to see if I could debug the problem. The fact is that the culture received in the parameters of the
Convert
method was okay, but itsCurrentNegativePattern
was not the same as in theThread.CurrentThread.CurrentCulture
. That's probably the reason why I have this problem. for the moment, I'll use this :return ((double)value).ToString("C2", Thread.CurrentThread.CurrentCulture);
in theConvert
method of my converter.