滚动到底部时将更多项目加载到 ListBox 中 [英] Load more items into ListBox when scrolled to bottom
本文介绍了滚动到底部时将更多项目加载到 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?
推荐答案
查看教程:
- http://blog.slimcode.com/2010/09/11/detect-when-a-listbox-scrolls-to-its-end-wp7/
- http://danielvaughan.orpius.com/post/Scroll-Based-Data-Loading-in-Windows-Phone-7.aspx
这篇关于滚动到底部时将更多项目加载到 ListBox 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文