积极答复者
关于分组控件的状态恢复问题

问题
-
我的一个页面里面有很多个列表,所以无法使用导航缓存来保存返回以后的状态
所以我使用了e.pagestate来保存了用户点击listview项的VerticalOffset,当用户返回此页面,判断有无此值,如有值则注册listview SizeChanged事件,在事件中我用代码定位到这个位置,如
ScrollViewer sv = Utils.FindChildType<ScrollViewer>(lv_drug);
sv.ChangeView(null,Convert.ToDouble(ListViewVerticalOffset),null);现在是位置是定位起了,但是,放大的分组视图则无法进行定位了。
求解。
答案
-
你好 qwsd01115,
是否是因为分组的放大视图显示之后,分组的数据错误,导致无法定位到当前分组?
可以尝试设置一个断点来看看是否有这样的问题,如果真的是因为数据绑定出错的话,那就重新绑定一下。
另外我建议不要用Position来定位,如果屏幕大小有变,那么位置定位不是一个好办法,可以用ScrollIntoView(Object) method 来定位到选中的项。
--James
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- 已编辑 Jamles HezModerator 2015年6月1日 14:09
- 已标记为答案 Jamles HezModerator 2015年6月9日 2:26
全部回复
-
你好 qwsd01115,
是否是因为分组的放大视图显示之后,分组的数据错误,导致无法定位到当前分组?
可以尝试设置一个断点来看看是否有这样的问题,如果真的是因为数据绑定出错的话,那就重新绑定一下。
另外我建议不要用Position来定位,如果屏幕大小有变,那么位置定位不是一个好办法,可以用ScrollIntoView(Object) method 来定位到选中的项。
--James
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.
- 已编辑 Jamles HezModerator 2015年6月1日 14:09
- 已标记为答案 Jamles HezModerator 2015年6月9日 2:26