Windows phone 7 在Windows Phone 7上使用StringFormat绑定?

Windows phone 7 在Windows Phone 7上使用StringFormat绑定?,windows-phone-7,Windows Phone 7,我正在进行WindowsPhone7开发,想格式化一个绑定到的字符串 由于某些原因,我无法使用如下所示的StringFormat。这个选项根本不存在 <TextBlock Text="{Binding Distance, StringFormat=\{0\}km}" /> 为什么Windows Phone 7不能使用StringFormat?StringFormat是在7.1/Mango中添加的,因为Mango使用SL4。例如: <TextBlock Text="{

我正在进行WindowsPhone7开发,想格式化一个绑定到的字符串

由于某些原因,我无法使用如下所示的StringFormat。这个选项根本不存在

 <TextBlock Text="{Binding Distance, StringFormat=\{0\}km}" />


为什么Windows Phone 7不能使用StringFormat?

StringFormat是在7.1/Mango中添加的,因为Mango使用SL4。例如:


<TextBlock Text="{Binding CurrentDate,StringFormat='dddd, d MMMM yyyy'}" />