I have a DataTemplate that I want to find using the FrameworkElement.FindResource()
. To do that I need to have a key on the data template.
The problem is that x:key and assigning a data type are mutually exclusive. (Reference)
So, once I set the DataType for my template, how do I find the Key value? Is there some formula that converts the DataTemplate into a string for the Key?
(For inquries as to why I need to get the DataTemplate found by Resource see this question.