On iOS, CollectionView ends up having more logical children than items. For instance, if you have 2 items and a Label as Item Template, and inspect the LogicalChildren, it ends up with 3 labels instead of 2. This third label is not visible on the app.
This works as expected on Android and Windows.
Some more details:
_measurementCells is caching the cells that were bound so they can be reused, but those are cleared up while loading and not the ItemView children. Next time a cell is analyzed it is re-bound, so in the sample the first item is added twice.
Description
On iOS, CollectionView ends up having more logical children than items. For instance, if you have 2 items and a Label as Item Template, and inspect the LogicalChildren, it ends up with 3 labels instead of 2. This third label is not visible on the app.
This works as expected on Android and Windows.
Some more details: _measurementCells is caching the cells that were bound so they can be reused, but those are cleared up while loading and not the ItemView children. Next time a cell is analyzed it is re-bound, so in the sample the first item is added twice.
Steps to Reproduce
Run the CollectionViewItemsWithFixedWidthAndDifferentHeight Core.DeviceTests for iOS.
Link to public reproduction project repository
https://github.com/dotnet/maui/blob/340fc257bf5bee3d8e8b5d834da4fcddac077d72/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.cs#L237
Version with bug
8.0.0-rc.2.9511
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS
Affected platform versions
No response
Did you find any workaround?
No response
Relevant log output
No response