Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ListView.ScrollTo to Align SelectedItem with Center or End on Windows #26922

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

devanathan-vaithiyanathan
Copy link
Contributor

@devanathan-vaithiyanathan devanathan-vaithiyanathan commented Jan 2, 2025

Issue Details

The ListView.ScrollTo method fails to correctly scroll the selected item to the center or end of the ListView on the Windows platform. Instead, the scroll position always remains at the start and does not align the SelectedItem with the center or end of the list when using animation.

Root Cause

The scroll position is not calculated correctly based on the ScrollToPosition (center or end) when using animation.

Description of Change

The scroll position is now calculated based on the ScrollToPosition (center or end) with animation.

Validated the behaviour in the following platforms

  • Android
  • Windows
  • iOS
  • Mac

Issues Fixed

Fixes #26857

Output Screenshot

Before After
BeforeFixListview.mp4
AfterFixListView.mp4

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jan 2, 2025
@karthikraja-arumugam karthikraja-arumugam added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jan 2, 2025
@devanathan-vaithiyanathan devanathan-vaithiyanathan marked this pull request as ready for review January 4, 2025 08:17
@devanathan-vaithiyanathan devanathan-vaithiyanathan requested a review from a team as a code owner January 4, 2025 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ListView ScrollTo position always remains at the start even when set to Center or End
3 participants