While playing around with formatting a string with a currency value, I noticed a difference in how WPF displays it.
When formatting a decimal
value in XAML
, WPF displays it as 5,99 €
.
<TextBlock Text="{Binding Total, StringFormat={}{0:C}}"/>
return 5.99m;
When I format in code behind, it displays it as € 5,99
.
<TextBlock Text="{Binding TotalString}"/>
return string.Format("{0:C}", 5.99m);
Is this a bug?
I got Windows 10, targeting .NET version is 4.5.2.