Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show a comma separated number with StringFormat in XAML?

My code currently shows like this: 43521 reviews, I want it be like this: 43,521 reviews. How can I do that? and is there a full reference for all possible formats in StringFormat? couldn't find anything. thanks.

<TextBlock Text="{Binding Reviews,StringFormat='{}{0} reviews'}"/>
like image 392
user3293835 Avatar asked Mar 10 '14 09:03

user3293835


Video Answer


1 Answers

This one also worked :)

<TextBlock Text="{Binding Reviews,StringFormat='{}{0:N0} reviews'}"/>
like image 108
user3293835 Avatar answered Oct 23 '22 12:10

user3293835