Could anyone explain how HierarchicalDataTemplate works
- What Controls supports HierarchicalDataTemplate?
- What does a control need to support HierarchicalDataTemplate?
UPDATE
- What causes the TreeView to render
the parent and child nodes when the
same HierarchicalDataTemplate in a
HeaderedItemsControl only causes the
parent to be rendered?
Such control needs to be of type HeaderedItemsControl or derived from it. The current framework controls that do are MenuItem, ToolBar and TreeViewItem.
The HeaderedItemsControl overrides the PrepareContainerForItemOverride method and somewhere along that call path checks for HierarchicalDataTemplate.