The following forum(s) are migrating to a new home on Microsoft Q&A (Preview): Developing Universal Windows apps!

Ask new questions on Microsoft Q&A (Preview).
Interact with existing posts until December 13, 2019, after which content will be closed to all new and existing posts.

Learn More

[U8.1]How to cancel image loading in windows store universal app? RRS feed

  • Question

  • I have a big listview in my application witch contains image and some text.
    Im using default set source logic in listview itemTeplate
     <Image HorizontalAlignment="Center" Source="{Binding PosterImageUriString}" Stretch="UniformToFill"/>
    Problem appears when user scrolling list, images could not be loaded really fast from backend, so they not all appears while scrolling. But if do not stop while scrolling and scroll a lot, 200-300 items or more Im getting pretty big lag while images loaded. So looks like even if source property is reset while scrolling with binding, WP still schedules loading, so last image URL will be loaded latest, thats really bad user experiences.

    Is there a way to cancel image loading or, even better, change it priority to lowest while scrolling. I want to get to point when items that are currently on screen load asap, even if some images on top in list will be not loaded yet.
    I tried with behaviors + image.dispatcher changing and with extension method with loading via http client, but didnt really succeed. Did anybody solve this issue somehow? 

    Wednesday, May 27, 2015 10:33 AM