I got a TreeView containing different objects from different classes. Now I want to build a propertypanel, which shows up different content, depenting on what object/class is selected in the TreeView. What is the best way to build such panel? Differnt panels and collapsing panels depending on the selection(Whould make implementing the ObserverPattern this easier for me?)? Or an other approach?
I got a TreeView containing different objects from different classes. Now I want to
Share
I would bind the property panel (which could be just a
ContentControl) to theSelectedItemin theTreeView:Then I would use
DataTemplates to show the correct panel for each class of item you have:Obviously your
DataTemplates can be as complex as needed to display the various classes present in theTreeView.