Hi!
I have some questions for my treelistview. I switched datavirtualization on and made some changes to itemadapter etc. It mostly works great, but I experience some issues which someone probably has an answer to.
I changed to "ChildrenQueryModeDefault = TreeItemChildrenQueryMode.OnExpansion" on the itemadapter since I think this was needed for datavirtualization to work properly. I have implemented all the "CanHaveChildren, GetChildren, SetIsExpanded, GetIsExpanded" etc.
1. I have a "Expand all" button which expands all nodes and its children all the way to the leafs. This now only expands the first level of children. It shows the second level items as "expandable" with an arrow and I can manually expand them. I understand this probably have with some timing issue with the new query-mode. How do you work around this?
2. selecting a leaf-item from other parts of the application should expand the entire path in the treelistview. This is done by settings "IsExpanded" from the leaf all the way up to the first-level item. This also only expands the first level with the difference that the second-level items has no expansion-arrow looking like they dont have any children.
3. I have a datafilter connected to this tree. Returning "DataFilterResult.IncludedByDescendants" does not work here so I have to "spoof" it by saying that items not passing the filter but having children that does gets "DataFilterResult.Included"
Any pointers to how I can fix these or if you need any more information?
EDIT: I get it to sometimes work if I for instance want to expand all the way to a leaf by setting the isexpanded bottom-up instead of top-down. But then a visual issue exists in that the IsSelected property is not visualized correctly (the node have IsSelected set correctly)
EDIT2: Scenario of selecting a leaf from viewmodel and expanding all the way down to the leaf in a collapsed starting point. If I set the IsSelected property first on the leaf, then expand all the nodes from the leaf up to the root node (not vice-versa) I get it to work 98 % of the time... But sometimes the selection visual is not updated properly.
[Modified 4 hours ago]