Quantcast
Channel: Rewriting / Extending WPF TreeView
Viewing all articles
Browse latest Browse all 5

Rewriting / Extending WPF TreeView

$
0
0
Since your inner TreeViewItems are inside a DataTemplate I don't think they are handled correctly in the TreeView when selected.

Notice that your top level item is selectable, it is properly connected to a TreeView and so it selects properly.  

I think you need to go about populating the TreeView in a different manner, maybe check out HierarchialDataTemplate which allows for the recursive creation of your tree or just as simply call TreeView.Items.Add() and TreeViewItem.Items.Add() to populate your TreeView manually.

ItemsSource normally only works 1 level deep in a TreeView unless you use HierarchialDataTemplate.

Viewing all articles
Browse latest Browse all 5

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>