积极答复者
win8 store 上ListView GridView下拉刷新实现求助?

问题
-
我需要在wi8应用商店的应用实现一个下拉刷新的功能,主要用在ListView GridView的上,如在ListView上下拉时 顶部出现加载提示等。
在windows phone 上我已经实现了,在win8上遇到了些问题,我先用组合控件做了一个,感觉效果不太满意,打算重写ListView。
但是我用 ScrollViewer 的 ValueChanged去监听滑动到最顶部时,发现它只有先向上滑动后,然后下滑才会走到这个事件。
如果一进入listview就去下滑,ValueChanged这个事件并不会走?
然后我监听ManipulationStarted 等事件,没有走,不知道什么原因?
求助?
谢谢!
答案
-
你好 dzd2,
你的意思我不是很明白,ValueChanged事件在向上滑动的时候不触发,向下滑动的时候才触发?
你尝试过使用ValueChanging事件了么?ValueChaning事件应该是实时触发的,你通过判断Offset就可以知道是否到达顶端。
Manipulation事件没有触是因为ScrollViewer把你的所有手势动作给“吃掉”了,所以你处理不到这些东西,请参考Rob的一篇博客:http://blogs.msdn.com/b/wsdevsol/archive/2013/02/16/where-did-all-my-gestures-go.aspx
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 dzd2 2014年7月30日 6:24
全部回复
-
你好 dzd2,
你的意思我不是很明白,ValueChanged事件在向上滑动的时候不触发,向下滑动的时候才触发?
你尝试过使用ValueChanging事件了么?ValueChaning事件应该是实时触发的,你通过判断Offset就可以知道是否到达顶端。
Manipulation事件没有触是因为ScrollViewer把你的所有手势动作给“吃掉”了,所以你处理不到这些东西,请参考Rob的一篇博客:http://blogs.msdn.com/b/wsdevsol/archive/2013/02/16/where-did-all-my-gestures-go.aspx
<THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
Thanks
MSDN Community Support
Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.- 已标记为答案 dzd2 2014年7月30日 6:24