How can I format a decimal value conditionally in a WPF window?
- Value should be rounded to a whole number (Ex: 1,234)
- When the value is 0.00, it should display as a single zero. (Ex: 0)
Currently I use bellow mark up to format the decimal value, but it displays 00 when the value is 0.00. Please help.
<TextBlock Grid.Column="6" Padding="2" Text="{Binding Path=TotalAwardsExpended, StringFormat='{}{0:0,0}'}" />