Share via


How to show decimal value with a defined fixed decimal places in a label

Question

Tuesday, March 28, 2017 11:36 PM

Hi In our app we all users to define the number of decimal places to see for all cost values. How can I format the decimal value in a label to the defined decimal places? Not sure if this can be achieved using string format.

All replies (2)

Wednesday, March 29, 2017 12:19 AM âś…Answered

Sorry forgot to put the code <Label Text="{ Binding TotalSell, StringFormat='{0:C2}' }" />


Wednesday, March 29, 2017 12:18 AM

I think I have figured out how to do the formatting -