13

I want to show the numbers in text block with thousand separator in xaml but without floating point. how can i do it. i tried the following codes:

StringFormat={}{0:N}

it shows floating point.

StringFormat={}{0:000'.'000}}

it shows 1234 like 001,234 how can it do it?

Mahmood Jenami
  • 421
  • 1
  • 7
  • 20

2 Answers2

26

Use

{Binding StringFormat={}{0:N0}}

The good article about formatting in bindings.

Hamlet Hakobyan
  • 32,965
  • 6
  • 52
  • 68
2

For me this worked:

Label Text="{Binding Price, StringFormat='{}{0:N0}'}"
dangalg
  • 6,398
  • 4
  • 27
  • 37