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

How do I scroll to a specified item when using the ItemsView control? #10077

Closed
Gaoyifei1011 opened this issue Oct 17, 2024 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@Gaoyifei1011
Copy link

Describe the bug

How do I scroll to a specified item when using the ItemsView control?

-------------------------------------------

使用 ItemsView 控件时,如何滚动到指定项?

Steps to reproduce the bug

In ListView, there is a method named ScrollIntoView() that can scroll to the specified item, but in ItemsView, I can't find the corresponding method, I would like to ask the WinUI team has any good solution?

-------------------------------------------

在 ListView 中有一个名为 ScrollIntoView() 方法,可以滚动到指定项,然而在 ItemsView 中,我却没有找到对应的此类方法,想问一下 WinUI 团队有什么好的解决方案吗?

参考链接(Reference links)
https://learn.microsoft.com/zh-cn/uwp/api/windows.ui.xaml.controls.listviewbase.scrollintoview?view=winrt-26100

Expected behavior

Provide an equivalent method in the ItemsView

-------------------------------------------

在 ItemsView 中提供一个等效的方法

Screenshots

Image

NuGet package version

WinUI 3 - Windows App SDK 1.6.1: 1.6.240923002

Windows version

Windows 11 (22H2): Build 22621

Additional context

None

@Gaoyifei1011 Gaoyifei1011 added the bug Something isn't working label Oct 17, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the needs-triage Issue needs to be triaged by the area owners label Oct 17, 2024
@castorix
Copy link

There is ItemsView.StartBringItemIntoView

@Gaoyifei1011
Copy link
Author

There is ItemsView.StartBringItemIntoView

Thank you very much. I didn't notice this method before, thank you for your answer

@microsoft-github-policy-service microsoft-github-policy-service bot removed the needs-triage Issue needs to be triaged by the area owners label Oct 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants