Use "Insert" method to ObaervableCollection binded to the NavigationView.MenuItemsSource lead false result #8370
Labels
area-NavigationView
NavView control
bug
Something isn't working
closed-Fixed
Described behavior has been fixed.
team-Controls
Issue for the Controls team
Milestone
Describe the bug
Hello!
![image](https://user-images.githubusercontent.com/46378395/230612588-8881a273-7d55-4d13-bb5f-eb6c7c946eb7.png)
The control I used is NavigationView from the Microsoft.Ui.Xaml, version 2.8.2, in a Universal Windows Platform Project.
I want to insert "Item 0”, "Item 2”, "Item 3”, "Item 4”, before "Items 4", "Items 5"...
I perform Insert( 0, item ) action by clicking "Insert" Button to the ObservableCollection binded to the MenuItems property. But I got a false result. For comparason, I place a ListView on the right side of the NavigationView, whose ItemsSource property also bind to the same ObservableCollection. The result of ListView is correct. See the picutre below. The "Item 0" appears twice in the NavigationView.
The same ObservableCollection lead to different result. I think it may be some bugs in NavigationView.
Thanks very much.
Steps to reproduce the bug
I upload my project here for you to further research. Click "Insert" Button, and you will see the result.
Demo.zip
Expected behavior
No response
Screenshots
No response
NuGet package version
WinUI 2 - Microsoft.UI.Xaml 2.8.2
Windows version
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: