Negative currency number XAML

I have a little problem with the current format of my negative currency number. Вот скриншот, возобновляющий мою ситуацию.

  1. Вот как я использую StringFormat в своей привязке. (Кстати, я пробовал только {0: C})
  2. Как и ожидалось
  3. Текущие настройки моего компьютера для отрицательного числа валюты 4.
  4. The result when I'm running my application

alt text

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 the Thread.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 its CurrentNegativePattern was not the same as in the Thread.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 the Convert method of my converter.
10
задан esylvestre 31 October 2010 в 17:25
поделиться