I have the need to extend the DatePicker. I try to do this as I have done when I have extended the standard WPF controls (e.g. TextBox), but I have some problems.
I can't make my extended control use its own template.
The control has this code:
Then I have a folder in the root called "Themes" which contains a file called "Generic.xaml". This XAML file contains the template that i want to apply to the control:
But the template is never applied. Instead the default template for the DatePicker is used, and I don't now how to replace this with my own...
So the question is:
How can I make my custom control inheriting from DatePicker use a custom template?