I am using datetime displayed in a lot of places in my Windows Phone 7 Application. The default date format looks ugly and I formatted it to something like this.
<TextBlock Text="{Binding Date, StringFormat='MMM d, h:mm tt'}"/>
The obvious problem with the above code is that I will have to do this copy pasting like everywhere. So, if a date format changes at some place, then I will have to do the same redundantly everywhere. Is there a better way to handle this in Silverlight/C# ?
Even better, is there a way to override Date.ToString() for the entire Application so that I can do the formatting there and I can simply have my code like this (I ask this because I do Ruby and in Ruby this is possible)
<TextBlock Text="{Binding Date}"/>
If both are not possible, please guide me in solving this problem.
A ValueConverter may be?