【问题标题】:Is it possible to use something like MaxLength for Input Field of DatePicker?是否可以对 DatePicker 的输入字段使用 MaxLength 之类的东西?
【发布时间】:2012-07-16 12:46:05
【问题描述】:

是否可以对 WPF DatePicker 的输入字段使用 MaxLength 之类的内容?

【问题讨论】:

  • 确定 maxlenght=88 --> 01.04.2029 ...

标签: wpf datepicker


【解决方案1】:
<DatePicker.Resources>
    <Style TargetType="{x:Type DatePickerTextBox}">
       <Setter Property="MaxLength" Value="10" />
    </Style>
</DatePicker.Resources>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-02-07
    • 1970-01-01
    相关资源
    最近更新 更多