滚动到底部时将更多项目加载到 ListBox 中 [英] Load more items into ListBox when scrolled to bottom

查看:27
本文介绍了滚动到底部时将更多项目加载到 ListBox 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将 ListBox 绑定到 List.我想在滚动到列表底部时加载更多项目,以便显示一些指示加载的动画并展开绑定列表.如果我理解正确,我可以使用 ObservableCollection 而不是 List 并扩展该集合.此外,我可以使用底部的 ItemPresenter 和 Image 将 ItemPresenter 包装到 StackPanel 中.

I've got ListBox bound to List. I want to load more items when scrolled to bottom of list so that some animation indicating loading is shown and bound list is expanded. If I understand correctly, I can use ObservableCollection instead of List and expand that collection. Also, I could wrap ItemPresenter into StackPanel with ItemPresenter and Image at bottom.

但是如何检测列表已滚动到底部并开始扩展集合?

But how do I detect that list has been scrolled to bottom and initiate expanding of collection?

推荐答案

查看教程:

这篇关于滚动到底部时将更多项目加载到 ListBox 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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