Reputation: 13574
I am using the following code Binding Path=InvoiceAmount, StringFormat={}{0:C0}
snippet and its working good, as i am not interested in the fraction part. It yields the result in this manner $12. But for sake of reading, can the currency format be like this $12.00 instead of above.
I mean any rounding-off code for decimal part or any hack for such situation
Thanks in advance
Upvotes: 18
Views: 32670
Reputation: 707
In the application I work on, we use the following and it displays $12.00
StringFormat='{}{0:c}'
Cheers
Upvotes: 32
Reputation: 3848
Any Binding can be "hacked" using IValueConverter ;)
You may use format like this Binding Path=InvoiceAmount, StringFormat={}{0:C0}.00
, but be careful, because this way dont care about system decimal separator.
Upvotes: 8