I've got the following scenario: WPF Treeview displaying custom objects, each of them containing a list of children. So the problem is: Each of the custom objects is controlled by a combobox that can change the current object from Class A to Class B/C/D and vice versa. Classes A-D are all subclasses of a superclass. So far so good. Each class should be represented by a specific Datatemplate in the WPF treeview, so each time, the user changes the object class (using the inline-combo) the item should get a new template applied. So far I've tried:
- DataTemplate Selector Class (gets only applied at start)
- "nulling" DatatemplateSelector in treeview and reappling it after object change (too slow)
- Datatemplate by class (x:Type) (works, but I need three different Templates per Object, one graphic, one minimum, one maximum display width with additional TextBlocks)
- Datatrigger (I do not know how to databind it to the changed Class)
Might be some kind of systematic mistake. Your help is appreciated very much
Greets
Markus