How to load a resource dictionary control template in code for a calendar control
I have a WPF calendar calendar and the template for the day has a property
cal.DayTemplate =
I created a dictionary file associated with my control template for the calendar day
But I'm not sure how to load it into a property DayTemplate
.
I added a dictionary to Application.Resources
inApp.xaml
x:Key
to my control template x:Key="DayTemplate"
So while for download this will work
cal.DayTemplate = new DataTemplate("DayTemplate");
+1
source to share