1 Answer
1

Probably you already have solved this, but for me, DataTemplates (HierarchicalDataTemplate as well) never worked properly, if I had defined x:Key and DataType at the same time. This question asks about DataTemplates' DataType:

This property that is very similar to the TargetType property of the Style class. When you set this property to the data type without specifying an x:Key, the DataTemplate gets applied automatically to data objects of that type. Note that when you do that the x:Key is set implicitly. Therefore, if you assign this DataTemplate an x:Key value, you are overriding the implicit x:Key and the DataTemplate would not be applied automatically.

I ended up creating one DataTemplate with x:Key and second one with DataType, which had just one ContentControl that had ContentTemplate set to DataTemplate with x:Key.