Skip to content

Conversation

@Shalini-Ashokan
Copy link
Contributor

@Shalini-Ashokan Shalini-Ashokan commented Feb 3, 2026

Issue Details

CollectionView’s programmatic ScrollTo does not work when using a horizontal ItemsLayout on iOS/MacCatalyst. After calling ScrollTo(index, position: ScrollToPosition.Start, animate: true), the scroll position remains unchanged.

Root Cause

In the CV2 iOS handler, the scroll direction is hardcoded to Vertical instead of using the actual layout direction. As a result, horizontal layouts receive incorrect scroll position calculations.

Description of Change

Replace the hardcoded vertical direction with a dynamic call that retrieves the actual scroll direction from the controller. This ensures that horizontal layouts receive the correct scroll position values.

Fix reference

I have fixed the issue in the same way as CV1, by referring to the following code.

Controller.CollectionView.ScrollToItem(indexPath,

Validated the behavior in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #33852

Output ScreenShot

Before After
Before-Fix.mov
After-Fix.mov

@dotnet-policy-service
Copy link
Contributor

Hey there @@Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@dotnet-policy-service dotnet-policy-service bot added community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration labels Feb 3, 2026
@sheiksyedm sheiksyedm added area-controls-collectionview CollectionView, CarouselView, IndicatorView collectionview-cv2 platform/ios labels Feb 3, 2026
@sheiksyedm sheiksyedm marked this pull request as ready for review February 3, 2026 09:49
@sheiksyedm
Copy link
Contributor

/azp run maui-pr-uitests 

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-controls-collectionview CollectionView, CarouselView, IndicatorView collectionview-cv2 community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[iOS/MacCatalyst] CollectionView ScrollTo does not work with horizontal Layout

2 participants