带日期和附加字符串的 Stringformat WPF
Stringformat WPF with Date and additional string
我想在我的文本框中格式化日期时间,如下所示:
2018 年 5 月 8 日 12:18 呃
Text="{Binding CreationDate, StringFormat=dd.MM.yy hh:mm}"
这是我到现在为止得到的,但是 "Uhr" 不见了。
这对我有用
<TextBlock Text="{Binding MyDate,StringFormat=dd.MM.yyyy hh:mm U\hr}" />
我想在我的文本框中格式化日期时间,如下所示: 2018 年 5 月 8 日 12:18 呃
Text="{Binding CreationDate, StringFormat=dd.MM.yy hh:mm}"
这是我到现在为止得到的,但是 "Uhr" 不见了。
这对我有用
<TextBlock Text="{Binding MyDate,StringFormat=dd.MM.yyyy hh:mm U\hr}" />