首页 > Windows开发 > 详细

wpf datetime format

时间:2019-10-10 01:02:33      阅读:111      评论:0      收藏:0      [点我收藏+]
原文:wpf datetime format

技术分享图片
<Style TargetType="{x:Type DatePickerTextBox}">
            <Setter Property="Control.Template">
                <Setter.Value>
                    <ControlTemplate>
                        <TextBox x:Name="PART_TextBox" Text="{Binding Path=SelectedDate, StringFormat=‘yyyy-MM-dd‘, 
     RelativeSource={RelativeSource AncestorType={x:Type DatePicker}}}" />
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
技术分享图片

 

wpf datetime format

原文:https://www.cnblogs.com/lonelyxmas/p/11645213.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!