Let's say I have the number 1234567.89 . The number is displayed in the WPF text block. I am trying to apply the StringFormat attribute to the Text property so that the number is displayed as follows:
1.234.567,89
As you can see, thousands and decimal separators are inverted from the specification of the invariant culture.
I tried setting numerous combinations for StringFormat , but to no avail. This is the last thing I came up with:
Text="{Binding SomeBinding, StringFormat={}{0:#'.'##0','00}}"
But the conclusion is wrong. In addition, using N2 or changing a culture is not an option. I would like to avoid converters if possible.
So, is there a way to change the default delimiters through XAML?
c # wpf xaml string-formatting
Miloš Ranđelović Feb 21 '13 at 10:42
source share