tags:

views:

159

answers:

1

How to change the background color for a DatePicker's Calendar? Thanks!

A: 

If you are speaking of the WPF Toolkit DatePicker from Microsoft, one possibility is to get the source code for the Toolkit and then modify the Generic.xaml theme file for the DatePicker. Add the Background property the DatePickerTextBox section of the DatePicker style like:

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