Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 91519

Cache image in CustomCell for the ListView

$
0
0

Hi. I created a custom cell template correctly binded to the data. How to cache image?

My idea was to use a cache image but the binding appears after the object creation so it doesn't work.
Here an example of the code.

    UriImageSource cacheImage = new UriImageSource();
    userImage.SetBinding(Image.SourceProperty, "PhotoURL");
    cacheImage.Uri = new Uri(userImage.Source == null ? "http://lorempixel.com/50/150/" : userImage.Source.ToString());
    userImage.Source = cacheImage;`

Viewing all articles
Browse latest Browse all 91519

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>