【发布时间】:2010-10-22 17:56:39
【问题描述】:
如何更改 DatePicker 日历的背景颜色? 谢谢!
【问题讨论】:
标签: wpf colors background datepicker
如何更改 DatePicker 日历的背景颜色? 谢谢!
【问题讨论】:
标签: wpf colors background datepicker
如果您说的是 Microsoft 的 WPF Toolkit DatePicker,一种可能性是获取 Toolkit 的 source code,然后修改 DatePicker 的 Generic.xaml 主题文件。在 DatePicker 样式的 DatePickerTextBox 部分添加 Background 属性,如:
<primitives:DatePickerTextBox x:Name="PART_TextBox"
Grid.Row="0" Grid.Column="0"
Foreground="{TemplateBinding Foreground}"
Background="{TemplateBinding Background}"
HorizontalContentAlignment="Stretch"
VerticalContentAlignment="Stretch" />
【讨论】: