I am in the process of customizing a treeview contro, well its actually the treeview items. My understanding of a hierarchical control is more or less teh same as a non-hierarchical control like a listbox. So maybe if I explaing that you can tell me where
im going wrong. When customizing a non-hierarchical data control I basicly use the ItemContainerStyle and ItemTemplate. For defining the container a ControlTemplate is used and somewhere inside that a ContentPresenter is placed. In turn this ContentPresenter
represents the actually item which is defined in the ItemTemplate and is of the type DataTemplate. Nice an easy.
So with the TreeView I thought it would be the same just with a few changes. These changes being that the ItemContainerStyle (template) in addition ot a ContentPresenter needs an ItemsPresenter.
The second change is the ItemTemplate, instead of a DataTemplate we need a HierarchicalDataTemplate and have its ItemsSource binded to the treeviewItems child collection. Inside the HierarchicalDataTemplate I place a panel with textblock, border etc
The problem is that the ContentPresenter does not display. Everything inside the TreeViewItem.Template is fine but the damn content is no where to be seen. It is no doubt me that has misunderstod somthing with the treeview control but I just can't see wh
View Complete Post