I’m creating a custom templated composite control. If there is no ‘ItemTemplate’ specified in the mark-up, how do I create a default template programmatically?
I’m creating a custom templated composite control. If there is no ‘ItemTemplate’ specified in
Share
Right, maybe I should have played around with it a bit before posting my question. I’ve created the following class:
So when if the ItemTemplate is null, I instantiate a new ItemTemplateDefault and assign it as ItemTemplate. See below.
Is this a decent way of doing this? I really just thought up what seemed natural, so I would appreciate it if you have any feedback.
Cheers,
James