Roberto Salemi

Roberto Salemi

  • NA
  • 146
  • 141.4k

[WPF] TextBlock: set length of number with string format

May 14 2015 4:00 AM
Hi,


I formatted a TextBlock with:


<TextBlock Text="{Binding Value, StringFormat='\{0,0\}%'}"/>
to display a number in the format 99.9%.


With this string format, the user can write 9999999999%, it's wrong!


The part integer should be max of  2 number.


Thanks.



Answers (7)