VirtualizingTreePanel with virtualization turned on
if it is loaded with nodes collapsed and you attempt to expand a node.
Please have a look on attached VirtualizationSample that I have modified (reduced number of elements and added IsExpanded property binding)
- Run sample
- Check "Virtualize items"
- Click Load items => two items should load
- Expand any of items
An unhandled exception of type 'System.ArgumentOutOfRangeException' occurred in PresentationFramework.dll
Additional information: Specified index is out of range or child at index is null. Do not call this method if VisualChildrenCount returns zero, indicating that the Visual has no children.
TreeViewEx.dll!System.Windows.Controls.VirtualizingTreePanel.InvalidateMeasure(System.Windows.Controls.TreeViewExItem child) Line 236 C#
TreeViewEx.dll!System.Windows.Controls.VirtualizingTreePanel.MeasureOverride(System.Windows.Size availableSize) Line 145 C#