【发布时间】:2016-02-16 09:34:07
【问题描述】:
我想将 silverlight DatePicker 日期格式设置为“MM/dd/yyyy”格式。我尝试了 convertors,并在 DisplayDate 和 SelectedDate 属性中设置了 StringFormat。到目前为止没有运气。
我不能更改应用程序范围的文化短日期格式字符串来实现这一点,仅在特定的 DatePicker 中需要这种格式。
<controls:DatePicker x:Name="GotoDatePicker2"
SelectedDate="{Binding Date, Mode=TwoWay, NotifyOnValidationError=True}"
DisplayDate="{Binding Date, Mode=TwoWay}" >
</controls:DatePicker>
关于这个问题的任何解决方法?
【问题讨论】:
-
请根据您的问题创建Minimal, Complete, and Verifiable example。不看你的作品,真的很难知道发生了什么。
标签: c# date silverlight datepicker silverlight-5.0