Skip to content

[Windows] CollectionView ItemsLayout does not update while switch from LinearItemsLayout to GridItemsLayout #27946

@TamilarasanSF4853

Description

@TamilarasanSF4853

Description

When changing the ItemsLayout of a CollectionView from LinearItemsLayout to GridItemsLayout dynamically, the layout does not update on Windows. The items remain displayed in a linear layout even after switching to a grid layout. LinearItemsLayout vertical to horizontal also not working , it still stays with default value. This issue only occurs on Windows. On Android, the layout updates correctly when switching between LinearItemsLayout and GridItemsLayout.

Note: While fixing this issue enable the mentioned UITest: Issue5354

Screen.Recording.2025-02-21.104021.mp4

Steps to Reproduce

  1. Launch the app on a Windows device CollectionViewIssue.zip
  2. Click the Switch to Grid Layout button.
  3. Click the Switch to Linear Layout button again.
  4. Observe that on Windows, the layout does not switch to GridItemsLayout.

Expected Behavior:

When clicking the Switch to Grid Layout button, the CollectionView should update to a grid layout with multiple columns. When clicking the Switch to Linear Layout button, the CollectionView should revert to a linear layout. The layout should dynamically update as expected when switching between GridItemsLayout and LinearItemsLayout on all platforms.

Actual Behavior:

On Windows, the CollectionView remains in LinearItemsLayout, even after switching to GridItemsLayout. The layout does not visually update, and items are still displayed in a single column (linear format). On Android, the layout switches correctly between grid and linear views.

Link to public reproduction project repository

No response

Version with bug

9.0.40 SR4

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-collectionviewCollectionView, CarouselView, IndicatorViewplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions