Is there a simple way to change the text color of a WPF Toolkit Calendar control? I thought it would be simple, but it appears that the color is hard-coded. To change it, I am going to have to go pretty deep into the control templates for the Calendar and its component parts.
Doing so has some undesirable side effects. Here is an example: I copied the control template for the Calendar control and its component parts (CalendarItem, CalendarButton, CalendarDayButton) to a local resource dictionary, then set the styles for my instance of the Calendar to the local resources, like this:
<toolkit:Calendar
Name="calendar1"
Style="{StaticResource Outlook2010CalendarStyle}"
CalendarItemStyle="{StaticResource Outlook2010CalendarItemStyle}"
CalendarButtonStyle="{StaticResource Outlook2010CalendarButtonStyle}"
CalendarDayButtonStyle="{StaticResource Outlook2010CalendarDayButtonStyle}" />
Unfortunately, when I set the CalendarDayButtonStyle, I lost the "grayed out" effect that the control normally applies to days before the beginning and after the end of the month. So, it looks like I am going to have to restore that effect in my own markup or code.
Before I go any deeper down the rabbit-hole, I thought I would stop and do a reality check. Do I really need to do all this, just to change the color of the text on the Calendar control? Is there a simpler approach that I am missing? Has anyone derived a custom control that allows for a simple change of the text color? Thanks for your help.