I use a WPF treeview which contains many items, 1000 for example. The treeview will load very slowly, so I followed microsoft advice from the next link:
http://msdn.microsoft.com/en-us/library/cc716882.aspx
I set VirtualizingStackPanel.IsVirtualizing to "True" and VirtualizingStackPanel.VirtualizationMode to "Recycling". The performance of the treeview is now very good, but one problem occurs.
When I want to find one node in the treeview which is out of the visible nodes,the TreeViewItem will be null. for example, I want to find one node in the top of the treeview when the treeview in the bottom. I want the treeview scroll to the top automatically after I search the node and display the node which need show. How could I do this?
your help is sincerely appreciated!