问题
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!
回答1:
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.
来源:https://stackoverflow.com/questions/18759229/binding-string-format-number-commas-no-decimal-places