Binding with StringFormat on Windows Phone 7?
I'm doing some Windows Phone 7 development and want to format a string I've bound to.
For some reason I cannot use the StringFormat like shown below. The option just isn't there.
<TextBlock Text="{Binding Distance, StringFormat=\{0\}km}" />
开发者_开发问答Why isn't the StringFormat available for Windows Phone 7?
StringFormat was added with 7.1 / Mango since Mango uses SL4. An example from Visual Studio Magazine:
<TextBlock Text="{Binding CurrentDate,StringFormat='dddd, d MMMM yyyy'}" />
精彩评论