我是WPF的新手,并不完全了解依赖属性&东西,我想将Datepicker的值设置为MaskedTextBox。或者有没有办法掩盖Datepicker文本框而不使用WPFToolkit / Extend它应该没问题。请帮忙
<DatePicker Margin="259,12,79,270" x:Name="myDatePicker" TextBoxBase.TextChanged="DatePicker_TextChanged">
<DatePicker.Resources>
<Style TargetType="{x:Type DatePickerTextBox}">
<Setter Property="Control.Template">
<Setter.Value>
<ControlTemplate>
<WindowsFormsHost x:Name="myText">
<wpfForm:MaskedTextBox x:Name="myDatePickerText" x:Uid="myDatePickerId" Mask="00/00/0000" />
</WindowsFormsHost>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</DatePicker.Resources>
</DatePicker>