Hello, currently we are using in our product TreeListView for WPF and we have big problem when navigating through huge tree.
Our test case contains about 5000 nodes with maximum 6 nesting depth.
Tree looks like:
group B,C,D can contains 1000 nodes in each subgroup. Indexes created dynamically when navigating by tree, and depends on metadata of each variable.
Also class VariableTreeListBoxItemAdapter : TreeListBoxItemAdapter is using for better performance, with override
public override IEnumerable GetChildren(TreeListBox ownerControl, object item)
var model = item as VarsTreeItem;
return model != null ? model.Children : null
public ObservableCollection<VarsTreeItemBase> Children
if (_children == null)
if (VarMetadata != null)
The actual problem that binding to SelectedItem in TreeListView from AutoCompleteBox calls GetChildren() from VariableTreeListBoxItemAdapter for all 5000 nodes that created before selected if try to select last node in tree from AutoCompleteBox collection. And this call takes more than 50 seconds in UI thread. If node selected from first group the delay is not so big, and not visible by user.
VarsTreeItemBase.Children property used lazy loading and created elements only for groups and subgroups. Subtree for any variable created in Children property. So when user try to expand elements subtree creates dynamically and fast.
But when user select last item or in the middle of tree from AutoCompleteBox creating of 5000 previous elements in tree is too slow and hangs UI thread using TreeListBoxItemAdapter.
Could you suggest how i can fix the issue?
[Modified 6 months ago]