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

Proposal: Expose a method in ListViewBase that allows scrolling to a specific item using the item's index. #9890

Open
w-ahmad opened this issue Aug 13, 2024 · 3 comments

Comments

@w-ahmad
Copy link

w-ahmad commented Aug 13, 2024

Proposal: Expose a method in ListViewBase that allows scrolling to a specific item using the item's index.

Summary

There should be a method in ListView that can scroll items into view by their index. Currently there is ScrollIntoView(object item) that accepts item itself to bring into view. This method isn't useful when there are duplicate items in the ItemsSource. It only brings first matching index to the view.

To bring the items into view by calling ScrollIntoView(object item), the internal implementation uses item's index.


This method accepts the item's index rather than the item itself. It seems possible to expose a method like ScrollIntoView(int index) in ListViewBase.

Rationale

  • There is no method available in ListViewBase to scroll duplicate items into view.
  • The current method results in unwanted indexes, causing ambiguity.

Scope

Capability Priority
This proposal will allow developers to scroll any index within the ListViewBase by using it's index. Must
@w-ahmad w-ahmad added the feature proposal New feature proposal label Aug 13, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Aug 13, 2024
Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@w-ahmad
Copy link
Author

w-ahmad commented Sep 14, 2024

@ranjeshj could you please make it in plan for next service release?

@w-ahmad
Copy link
Author

w-ahmad commented Feb 18, 2025

Just to keep it alive!

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

No branches or pull requests

2 participants