Scroll WinRT ListView to particular group

孤街浪徒 提交于 2020-01-15 19:18:33

问题


I have a ListView and grouped items inside of it. User has different ways of navigating into the page, and according to the way he navigates, I wish to have a certain group in view when the page opens.

I tried setting these:

itemGridView.ScrollIntoView(....);
itemGridView.SelectedIndex = ....;
itemGridView.SelectedItem = ....;

where itemGridView is the name of the ListView, but none of that seems to work.

Any help appreciated, thanks.


回答1:


You could do some visual tree traversing to find the ScrollViewer that is part of the ListView template, find the group and scroll the ScrollViewer to the position of your group.



来源:https://stackoverflow.com/questions/11325384/scroll-winrt-listview-to-particular-group

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!