How to set background of Calendar of DatePicker

Apr 30, 2009 at 3:00 AM
Hi

How to set background color for a Calendar of DatePicker?
I even copied the theme's generic.xaml  (from the source code) of the calendar to my resource file, it still does't work.
 
Thanks for help!
Steve
Coordinator
May 5, 2009 at 9:40 PM
Hi Steve -

You could try using the CalendarStyle Property on the DatePicker and assign it a Style for a Calendar with the Background Property set to whatever you need. For example:

<

 

ms:DatePicker >
    <ms:DatePicker.CalendarStyle>
        
<Style TargetType="ms:Calendar">
            
<Setter Property="Background" Value="Blue"/>
        
</Style>
    
</ms:DatePicker.CalendarStyle>
</ms:DatePicker>

-Eric, MSFT