You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the NavigationView control is bound to a collection of NavigationViewItem, when one of the item in the collection is about to be removed, the OnMenuItemsSource_CollectionChanged method will be invoked with e.Action = NotifyCollectionChangedAction.Remove. Before the actual removal, the NewItems is checked in case it's also in the OldItems to avoid delete and adding again. However, the NewItems might be null so that null reference exception was occured.
To Reproduce
Create a NaviagtionView and bind its MenuItems to a ObservableCollection, and then remove one of the item in the colloction.
Expected behavior
the items to be removed successfully
Screenshots
OS version
Win 11
.NET version
8.0
WPF-UI NuGet version
Additional context
No response
The text was updated successfully, but these errors were encountered:
Describe the bug
If the NavigationView control is bound to a collection of NavigationViewItem, when one of the item in the collection is about to be removed, the OnMenuItemsSource_CollectionChanged method will be invoked with e.Action = NotifyCollectionChangedAction.Remove. Before the actual removal, the NewItems is checked in case it's also in the OldItems to avoid delete and adding again. However, the NewItems might be null so that null reference exception was occured.
To Reproduce
Create a NaviagtionView and bind its MenuItems to a ObservableCollection, and then remove one of the item in the colloction.
Expected behavior
the items to be removed successfully
Screenshots
OS version
Win 11
.NET version
8.0
WPF-UI NuGet version
Additional context
No response
The text was updated successfully, but these errors were encountered: