Skip to content

CarouselView IsSwipeEnabled=False Prevents Visual Navigation on Windows #29216

@snowcatliy

Description

@snowcatliy

Description

Setting the IsSwipeEnabled property of a CarouselView to False on the Windows platform prevents the visual switching of views when the Position property is updated programmatically (e.g., via TwoWay binding or ScrollTo). The view content fails to scroll or switch to the new position, even though the Position property itself and related events (like PositionChanged) might update correctly. This issue does not occur on the Android platform.

Expected Behavior:

Setting IsSwipeEnabled to False should only disable user touch or mouse swipe gestures for changing pages. Programmatically changing the CarouselView's position (e.g., by updating the bound Position property or calling the ScrollTo method) should still be able to visually scroll or instantly display the content at the new position.

Actual Behavior:

When IsSwipeEnabled is set to False, the visual content of the CarouselView does not switch when the CarouselView.Position property is updated via binding (or other programmatic means, like clicking a bound button that changes the ViewModel property). The CarouselView remains visually stuck on the initial page, even though the logical value of the Position property has changed (as evidenced by logs and the PositionChanged event).

On the Android platform, setting IsSwipeEnabled to False only disables user swiping, and programmatic changes to Position or calls to ScrollTo still correctly switch the views.

Related Issue:

This issue might be related to the navigation instability and binding loop observed on the Windows platform when using TwoWay binding on the Position property (#29215 ). This problem seems to prevent the programmatic animation/visual focus change that is key to making TwoWay binding (or any programmatic position update) work correctly.

Steps to Reproduce

  1. Clone the provided minimal reproducible sample repository (in this MRE, IsSwipeEnabled is pre-set to False): [https://github.com/snowcatliy/MAUI_MRE_CarouselView_IsSwipeEnabledBug_Windows]
  2. Build and run the project on the Windows platform.
  3. Click the "Page 2" button.
  4. Observe the visual behavior of the CarouselView (should remain stuck on Page 1 visually) and check the output console logs (the Position property should have updated to 1).
  5. Click the "Page 1" button.
  6. Again, observe the visual behavior (should still remain stuck on the current page) and check the output console logs (the Position property should have updated to 0).
  7. (Optional) Repeat steps 2-6 on the Android platform and observe the correct visual behavior.

Relevant log output:

Console output after clicking the "Page 1" button when the CarouselView is on Page 2:

Windows:

[ViewModel] TabSelectedCommand triggered with index: 0
[ViewModel] CurrentTabIndex changed to: 0
[Page] CarouselView Position changed to: 0, Previous: 1, ViewModel CurrentTabIndex: 0

Android:

[0:] [ViewModel] TabSelectedCommand triggered with index: 0
[0:] [ViewModel] CurrentTabIndex changed to: 0
[0:] [Page] CarouselView Position changed to: 0, Previous: 1, ViewModel CurrentTabIndex: 0
[0:] [ViewModel] CurrentTabIndex changed to: 1
[0:] [Page] CarouselView Position changed to: 1, Previous: 0, ViewModel CurrentTabIndex: 1
[0:] [ViewModel] CurrentTabIndex changed to: 0
[0:] [Page] CarouselView Position changed to: 0, Previous: 1, ViewModel CurrentTabIndex: 0

Visual Evidence:

Windows Behavior GIF (IsSwipeEnabled=False):

Image

Android Behavior GIF (IsSwipeEnabled=False - Working fine):

Image

Link to public reproduction project repository

https://github.com/snowcatliy/MAUI_MRE_CarouselView_IsSwipeEnabledBug_Windows

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

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, IndicatorViewpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions