在网格视图滚动端加载更多项目 [英] Load more items on grid view scroll end

查看:20
本文介绍了在网格视图滚动端加载更多项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 XAML/C# 开发 Windows 应用商店应用程序,我有一个 GridView,一次显示 12 个项目 (3 x 4).我需要做的是,一旦用户滚动到最后,就会向 GridView 添加更多项目.我如何捕捉最后滚动的事件?我尝试了很多方法,但没有任何效果...

I am developing a Windows Store Application in XAML/C# and I have a GridView displaying 12 items at a time (3 x 4). What I need to do is once the user scrolls to the end, more items are added to the GridView. How do I catch the event for scrolling at end?? I tried many approaches, but nothing worked...

更新:我花了很长时间和很多例子来弄清楚我做错了什么.ListView 有效,但 GridView 没有...最后我注意到 GridView 项目必须有一个宽度高度才能使增量加载工作.

UPDATE: It took me a LOOOONG time and lots of examples to figure what I was doing wrong. ListView worked, but GridView didn't... Finally I noticed that the GridView items must have a width height in order for incremental loading to work.

推荐答案

查看这些示例以了解如何设置实现 ISupportIncrementalLoading 接口的 ObservableCollection.

See these examples to learn how to set ObservableCollection<T> that implements the ISupportIncrementalLoading interface.

Metro:使用 ISupportIncrementalLoading 增量加载 GridView 和 ListView

来自 Windows 8 Camps:GridViews/ListViews 和大数据集

WinRT:如何正确使用导航实现 ISupportIncrementalLoading

这篇关于在网格视图滚动端加载更多项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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