8中的Scrollviewer事件

8中的Scrollviewer事件

本文介绍了Windows Phone 8中的Scrollviewer事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已将json请求称为&它会一次给我20张图片.我已经在页面中设置了这20张图片,但实际上总共有50张图片,现在我想再调用20张图片&滚动后将其加载到同一页面中,以便scrollviewer发生哪个事件 我必须处理好以便在一个页面中管理所有图像 

I have called json request & it will give me 20 image at one call.I have set this 20 images in my page but actually total images are 50, now i want to call another 20 images & load it in same page  after scrolling so which event of scrollviewer i have to handle so that i will manage all images in one page  

推荐答案

您应该将图像添加为ListBox项.首先,创建一个ObservableCollection< BitmapImage>.作为ListBox的ItemSource.下载任何图像集时,只需将它们添加到集合中即可.这样,将通知ListBox控件,并且它 将正确更新自身.

You should add images as ListBox items. First, create an ObservableCollection<BitmapImage> as an ItemSource for the ListBox. When you download any set of images, simply add them to the collection. This way the ListBox control will be notified and it will update itself correctly.


这篇关于Windows Phone 8中的Scrollviewer事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 20:22