I am extending the WPF Calendar control, and I have copied the control templates for the Calendar, CalendarItem, CalendarButton, and CalendarDayButton to the Generic.xaml
of my custom control. The TargetType for the Calendar control template is my custom control, FsCalendar:
<!-- Calendar Control Template -->
<Style TargetType="{x:Type local:FsCalendar}">
...
</Style>
But what about the other control templates? Do I leave them targeted at the original Calendar, like this?
<!-- CalendarDayButton Control Template -->
<Style TargetType="CalendarDayButton">
...
</Style>
Or do I target it to my custom control? If so, how would I do that?
I tried putting my namespace (local
) in the declaration, but that didn't work. So, as it stands, the TargetType is set to the default System.Windows.Controls.Primitives
namespace.
Thanks for your help.