I have a WPF TreeView with a HierarchicalDataTemplate. As I descend the hierarchy, expanding the nodes, I will eventually get to the bottom and data displayed via a normal DataTemplate. I'd like not to show those nodes - if I set the DataTemplate's containing TextBlock to Visible Hidden (or similar) I just get allocated space in the treeview. I'd like not to display those items so assume I need to remove them somehow. I cannot use a Filter on a CollectionView as there may be other nodes with children at this level. So basically, at any level I want to remove those nodes that have no children. The actual data is being loaded from an Xml file via an XmlDataProvider, so there are no class objects. Can anyone suggest how
thanks John