Formatting StringFormat in xaml for currency

I use the following Binding Path=InvoiceAmount, StringFormat={}{0:C0}snippet code and its performance, as I am not interested in part of the fraction. This gives the result in this way $ 12 . But to read, can the currency format be $ 12.00 , not higher.

I mean any rounding code for the decimal part or any hacking for such a situation

Thanks in advance

+5
source share
3 answers

Any binding can be "hacked" using IValueConverter;)

, Binding Path=InvoiceAmount, StringFormat={}{0:C0}.00, , .

+4

, , , $12.00

StringFormat='{}{0:c}'

+8

{Price binding, StringFormat = 'c'}

+1
source

All Articles