Nit*_*aul 8 silverlight xaml windows-phone-7 windows-phone-8
如何以给定的格式(7/24/13,11:24 AM)格式化DateTime,我找到了一个以类似方式格式化字符串的选项[Text ="{Binding CreatedDate,StringFormat = {0:g}}" ],但我不能在日期和时间之间添加(",")逗号.我怎么能在Windows手机上做到这一点.目前使用字符串格式我得到这样的日期(2013年7月24日上午11:24).
<TextBlock Text="{Binding Date, StringFormat='{}{0:MM/dd/yyyy, h:mm tt}'}" />
Run Code Online (Sandbox Code Playgroud)
会给你
2013年8月22日上午11:52
| 归档时间: |
|
| 查看次数: |
491 次 |
| 最近记录: |