【问题标题】:How to change BK color of DatePicker's Calendar如何更改 DatePicker 日历的 BACK 颜色
【发布时间】:2010-10-22 17:56:39
【问题描述】:

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

【问题讨论】:

    标签: wpf colors background datepicker


    【解决方案1】:

    如果您说的是 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" />
    

    【讨论】:

      猜你喜欢
      • 2019-09-27
      • 1970-01-01
      • 2021-12-18
      • 2020-02-20
      • 2022-06-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多