Lazy loading images in Virtualized Listbox

前端 未结 1 1952
旧巷少年郎
旧巷少年郎 2021-01-03 12:36

I\'m trying to lazy load thumbnail image for each item in a Listbox asynchronously.



        
1条回答
  •  情歌与酒
    2021-01-03 13:13

    Sounds like although your UI is virtualizing it isn't loading newer images quickly enough to keep up with your user's scrolling. Try setting VirtualizationMode to Recycling and set a longer CacheLength. Like so:

    
    

    Increasing CacheLength from "1,1" to "2,2" means two "pages" (or view-ports worth of items) will be loaded into memory before and after the page displayed to the user. Your app will consume that much more memory but users will be able to scroll further, faster, before running into images that aren't loaded.

    0 讨论(0)
提交回复
热议问题