Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Binding String Format Number Commas & No Decimal Places

Okay this is an easy one but I'd hugely appreciate your help because I've been mucking around for an hour trying to get it to work.

How do I change the following to get rid of the decimal places and just show the whole number?

Binding="{Binding ANLA, StringFormat=n}"

I know the format is something like

{0:0,0}

But I can't get the backslashes to work.

Thanks hugely in advance!

like image 479
I am Bish Avatar asked May 31 '26 12:05

I am Bish


1 Answers

You almost had it... how about trying this:

{Binding ANLA, StringFormat='0,0.'}

Please note that this will round the number to the nearest integer.

like image 107
Sheridan Avatar answered Jun 02 '26 05:06

Sheridan