<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>
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/25884.html
標籤:WPF
上一篇:wpf datagrid field to image converter 欄位 圖片轉化器
下一篇:WPF屬性系結實作雙向變化
