We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e163c82 commit 3aa4967Copy full SHA for 3aa4967
src/MaterialDesignThemes.Wpf/TreeListView.cs
@@ -84,6 +84,8 @@ internal void ItemExpandedChanged(TreeListViewItem item)
84
if (InternalItemsSource is { } itemsSource)
85
{
86
int index = ItemContainerGenerator.IndexFromContainer(item);
87
+ //Issue 3572
88
+ if (index < 0) return;
89
var children = item.GetChildren().ToList();
90
bool isExpanded = item.IsExpanded;
91
itemsSource.SetIsExpanded(index, isExpanded);
0 commit comments