Skip to content

CarouselView Item Changes Unexpectedly on Orientation Change in CV2 #28972

@NafeelaNazhir

Description

@NafeelaNazhir

Description

When using a CarouselView in a .NET MAUI application, the currently displayed item changes unexpectedly when the device orientation is switched between portrait and landscape modes. The behavior is inconsistent and does not maintain the expected item position. This issue occurs only on Cv2.

Screen.Recording.2025-04-14.at.4.54.12.PM.mov

Steps to Reproduce

  1. Launch the Application on iOS CarouselViewOrientationIssue.zip

  2. Change the device orientation to landscape mode.

  3. Observe the currently displayed item in the CarouselView.

Observed Behavior:
When the device orientation changes from portrait to landscape, it does not retain the currently displayed item. Instead, the displayed item changes to a different, seemingly unrelated item based on the following pattern:

Item 1 (Portrait) → Changes to Item 7 (Landscape).
Item 2 (Portrait) → Changes to Item 1 (Landscape).
Item 3 (Portrait) → Changes to Item 1 (Landscape).
Item 4 (Portrait) → Changes to Item 2 (Landscape).
Item 5 (Portrait) → Changes to Item 2 (Landscape).
Item 6 (Portrait) → Changes to Item 3 (Landscape).
Item 7 (portrait) → Changes to Item 3 (Landscape).

Expected Behavior:
The CarouselView should maintain the currently displayed item when the device orientation changes. Regardless of whether the orientation is portrait or landscape, the same item should remain visible.

Link to public reproduction project repository

No response

Version with bug

9.0.60 SR6

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

iOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions