-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
Description
When using a CollectionView where the ItemSource is set to a binding of type ObservableCollection, and IsGrouped is set to True, the app crashes if the ObservableCollection is updated such that: there are more than 2 items in the first group, or there is more than 1 item in any subsequent group.
I tested this by copy+pasting from Microsoft's official CollectionView grouping docs in a brand new project:
https://learn.microsoft.com/en-us/dotnet/maui/user-interface/controls/collectionview/grouping
Steps to Reproduce
- Download the linked repo
- Run the project on Windows and click the "Load Animals" button
- Note that the program does not crash if you modify to have only 1 animal in the second "Monkeys" group, and that it does crash if you subsequently add a third animal to the "Bears" group
Expected Outcome: The groups appear correctly.
Actual Outcome: The app crashes without an exception thrown.
Link to public reproduction project repository
https://github.com/megukaphii/GroupedCollectionViewBug
Version with bug
8.0.0-rc.2.9373
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
Windows, I was not able test on other platforms
Affected platform versions
Windows SDK 10.0.17763.0
Did you find any workaround?
No response
Relevant log output
No response