How can I format the TotalPrice to 2 decimal point?
I pass a double value to the <TextBlock Text="{Binding TotalPrice}" FontFamily="Segoe WP" />
For example I pass in 10, I want to show 10.00 in ListView column?
Code:
<GridViewColumn Header="Price" Width="50">
<GridViewColumn.CellTemplate>
<DataTemplate>
<StackPanel Width="50" >
<TextBlock Text="{Binding TotalPrice}" FontFamily="Segoe WP" />
</StackPanel>
</DataTemplate>
</GridViewColumn.CellTemplate>
</GridViewColumn>
Would this work?
See BindingBase.StringFormat Property