Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Change method that TreeView uses to load data.

$
0
0

I have a treeview which has some leafs that have a lot of items. It is also a multilevel treeview.  When I open a leaf I noticed that all next level treeview items go to get the data for the leafs under them.   This results in a lot of data access for things that the user may not even look at.

In WinForms we used to create a dummy item under the leaf (to create the expansion +) and when the leaf is opened we check if there is a dummy entry there and if so then populate that leaf with the data.

What I would like to know is if there is a way to make the WPF treeview behave that way.  I have coded it so that it will do that but is there a "lazy" way to populate the treeview?

Thanks

LS


Lloyd Sheen


Viewing all articles
Browse latest Browse all 18858

Trending Articles



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