Skip to content

[Windows & iOS] CollectionView2 ItemSizingStrategy="MeasureFirstItem" Fails to Apply Correct Sizing #13

@SuthiYuvaraj

Description

@SuthiYuvaraj

Description

When using a CollectionView with ItemSizingStrategy="MeasureFirstItem" in a .NET MAUI application, the behavior does not work as expected on Windows and CV2. The items are not sized correctly based on the first item. However, the actual behavior resembles MeasureAllItems, where each item's size is calculated individually, leading to inconsistent layouts.

Steps to Reproduce

  1. Run the attached sample ItemSizingStrategySample.zip
  2. Select the picker MeasureFirstItem and observe the behavior

Expected Behavior: The CollectionView should size all items based on the size of the first item in the collection.

Actual Behavior: The CollectionView sizes items as if ItemSizingStrategy="MeasureAllItems" is applied, where each item's size is calculated individually instead of using the size of the first item, resulting in inconsistent item sizes.

Link to public reproduction project repository

No response

Version with bug

10.0.0-preview.5

Is this a regression from previous behavior?

Not sure, did not test other versions, No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

iOS, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions