I want to to show the duration in minutes on my control but I don't want it to show up as with decimal numbers (eg, 65 instead of 65.94503).
<TextBlock Text="{Binding Duration.TotalMinutes, StringFormat=\{0\} minutes}" />
How can I do it?
If you want an integer to display, I think that all you need to do is set the StringFormat property as follows:
<TextBlock Text="{Binding Duration.TotalMinutes, StringFormat=N0}"/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With