_(:3」∠)_datepicker大成功~~
今天经理一定要洒家把datepicker格式改成固定“yy-MM-dd”
对渣渣来说太难了
然后百度
百度告诉我 要这样
<TextBlock TextWrapping="Wrap" Text="{Binding CurrentDateTime, StringFormat=yyyy-MM-dd}" Margin="8,0"/>
无效。。
又或者是这样
Text="{Binding Path=SelectedDate,Converter={StaticResource DateTimeFormatter},RelativeSource={RelativeSource AncestorType={x:Type DatePicker}},ConverterParameter=dd-MMM-yyyy}"
解析不过了都!
最后试了一下这样
Text="{Binding Path=SelectedDate, RelativeSource={RelativeSource AncestorType={x:Type DatePicker}}, StringFormat={}{0:yyyy/MM/dd}}"
从此神清气爽!太开森了~自豪感有木有
难道我努力一把也能学会写这个?