如何更改DatePicker日历的BK颜色

时间:2009-04-30 01:48:08

标签: wpf colors background datepicker

如何更改DatePicker日历的背景颜色? 谢谢!

1 个答案:

答案 0 :(得分:0)

如果您谈到Microsoft的WPF Toolkit DatePicker,一种可能性是获取Toolkit的source code,然后修改DatePicker的Generic.xaml主题文件。将Background属性添加到DatePicker样式的DatePickerTextBox部分,如:

<primitives:DatePickerTextBox x:Name="PART_TextBox" 
    Grid.Row="0" Grid.Column="0" 
    Foreground="{TemplateBinding Foreground}" 
    Background="{TemplateBinding Background}"
    HorizontalContentAlignment="Stretch"
    VerticalContentAlignment="Stretch" />