滚动WinRT的ListView的特定组 [英] Scroll WinRT ListView to particular group

查看:116
本文介绍了滚动WinRT的ListView的特定组的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个ListView和它内部的分组的项目。用户导航到页面不同的方式,并根据他的导航方式,我想有一定的组视图页面打开时。

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.

我试着设置了这些:

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

其中itemGridView是在ListView的名字,但这些方法都似乎工作

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

任何帮助AP preciated,谢谢。

Any help appreciated, thanks.

推荐答案

您可以做一些视觉上的树遍历找到的ScrollViewer是ListView控件模板的一部分,发现组和滚动的ScrollViewer到组的位置。

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.

这篇关于滚动WinRT的ListView的特定组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆