积极答复者
WindowsPhone8.1 下拉刷新和下拉加载

问题
-
WindowPhone8.1中,如何实现下拉刷新,上拉加载功能。我在网上找到的一些例子,都是SDK8.1之前的版本。
似乎都依赖于MouseMove这个事件,可是我发现在8.1中,并没有这个事件。
又或是依赖于ManipulationDelta,可是我又发现。即使我设置了ManipulationMode=ALL,在LisBox中,给ScrollVierer订阅OnManipulationDelta事件,并不会在我滑动ListBox项的时候被触发。只有当我滑动ListBox边缘的时候才会被触发。
又或是ScrollViewer的ViewChanged Or ViewChanging事件中,初次加载好时,我向上滑动并不会触发Changed事件。
请教诸位,如何实现这种功能?
答案
-
你好 FreestyleSago,
只有当我滑动ListBox边缘的时候才会被触发。
-> 因为你的手势被ListBoxItem吃掉了,所以只有在靠近边缘的时候才触发。
又或是ScrollViewer的ViewChanged Or ViewChanging事件中,初次加载好时,我向上滑动并不会触发Changed事件。
-> 不知道你有没有在ScrollViewer里面预留一块可以向上滑动的空间?如果没有向上滑动的空间,Changed事件是不会触发。
--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:13
-
你好 FreestyleSago,
我这里倒没有类似的源码,不过我记得貌似三方网站上面有……可以搜索一下。
http://www.tareqateik.com/extendedlistview-control-for-universal-apps-pull-to-refresh-load-more-data-on-demand#.VV2OXv4w_PY (这个是我搜到的……正确性不能保证)
--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年5月25日 12:11
- 已标记为答案 Jamles HezModerator 2015年6月1日 14:12
全部回复
-
你好 FreestyleSago,
只有当我滑动ListBox边缘的时候才会被触发。
-> 因为你的手势被ListBoxItem吃掉了,所以只有在靠近边缘的时候才触发。
又或是ScrollViewer的ViewChanged Or ViewChanging事件中,初次加载好时,我向上滑动并不会触发Changed事件。
-> 不知道你有没有在ScrollViewer里面预留一块可以向上滑动的空间?如果没有向上滑动的空间,Changed事件是不会触发。
--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:13
-
你好 FreestyleSago,
我这里倒没有类似的源码,不过我记得貌似三方网站上面有……可以搜索一下。
http://www.tareqateik.com/extendedlistview-control-for-universal-apps-pull-to-refresh-load-more-data-on-demand#.VV2OXv4w_PY (这个是我搜到的……正确性不能保证)
--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年5月25日 12:11
- 已标记为答案 Jamles HezModerator 2015年6月1日 14:12
-
希望这篇博客能够帮到你 增量加载 (incremental loading)