Can I expand downloading images to several threads?

那年仲夏 提交于 2020-01-24 13:22:16

问题


I had a problem with ListBox, which doesn't work fine with my collection (nested listboxes, non static size, etc). I tried DeferredLoadListBox, but it requires static height(not my variant).

So, I tried ItemsControl with ScrollViewer, and it works realy good! I have smooth scrolling, no lags, its exactly what i needed. But! As I understand, ListBox download content dynamically, only when it need this content, and ItemsControl loads all the content in one time.

And its a problem, because I load in ItemsControl a collection of 40-50 items, and each item has 1-4 images, and it takes about 5-6 seconds(than ItemsControl works great). As I understand - in this 5-6 seconds it downloads all the images. Question - is there any way to expand this operation to several threads, and using this hint reduce the ItemsControl's freezing?


回答1:


Just use LowProfileImageLoader with the standard ListBox



来源:https://stackoverflow.com/questions/14069769/can-i-expand-downloading-images-to-several-threads

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!