如何检测到 LongListSelector 的结尾?(WP8) [英] How to detect that the end of LongListSelector is reached? (WP8)

查看:26
本文介绍了如何检测到 LongListSelector 的结尾?(WP8)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要创建以下逻辑.例如,LongListSelector 最初包含 10 个项目.当用户将其滚动到结尾时,必须加载另外 10 个项目并将其添加到此 LongListSelector.再说一次,如果用户到达列表的末尾,则必须再添加 10 个项目.

I need to create the following logic. For example, LongListSelector contains 10 items initially. When user scrolled it to end, another 10 items must be loaded and added to this LongListSelector. Then again, if user reached the end of the list, 10 more items must be added.

我也预测可能存在以下问题.列表结束的事件必须只触发一次,直到加载新的 10 个项目.在触发新的列表结束事件"之前,我必须防止多次触发并让新项目被加载.

I also predict that there might be the following problem. The event of the list's end must be triggered only once, until new 10 items will be loaded. I must prevent multiple triggering and let the new items to be loaded, before new "End of List Event" will be triggered.

那么,如何制作呢?首先,我需要知道,如何检测到了 LongListSelector 的末尾?

So, how to make it? First of all, I need to know, how to detect that the end of the LongListSelector is reached?

推荐答案

以下官方博客上的博文准确解释了您想要做什么:http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/10/01/how-to-create-an-infinite-scrollable-list-with-longlistselector.aspx

The following blog post on the official blog explains exactly what you want to do: http://blogs.windows.com/windows_phone/b/wpdev/archive/2012/10/01/how-to-create-an-infinite-scrollable-list-with-longlistselector.aspx

本质上,您处理 LongListSelector.Link 事件并处理该事件.

Essentially, you handle the LongListSelector.Link event and work upon that.

这篇关于如何检测到 LongListSelector 的结尾?(WP8)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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