Reputation: 2097
How can I style the background color of the popup / dropdown control of the default WPF DatePicker control? I want to do this via xaml.
This does not work:
<Style TargetType="{x:Type DatePicker}">
<Setter Property="FontFamily" Value="/fonts/#Titillium Web" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Background" Value="#777777" />
</Style>
I assume that it does not target the right property.
This is how it currently looks. I want to change the white background to something readable.
Upvotes: 4
Views: 4372
Reputation: 196
Try targeting DatePickerTextBox, like so:
<Style TargetType="{x:Type DatePickerTextBox}">
<Setter Property="Background" Value="#777777" />
</Style>
Upvotes: 1