locked
Cache used by FFImageLoading and Xamarin.Forms.Image/UriImageSource? RRS feed

  • Question

  • User372105 posted

    In my project I need to use both FFImageLoading and Xamarin.froms.Image since I am using Mr.Gestures (And that is available only for Xamarin.forms as far as I know). On the start of the app I would like to store all images that will be used in cache.

    Will I have to instantiate both a CachedImage and a Xamarin.Froms.Image like this: uriImageSource.Uri = new Uri(imageUrl); Xamarin.Forms.Image image.Source = uriImageSource; // ensuring image is truly downloaded. FFImageLoading.Forms.CachedImage cachedImage = new FFImageLoading.Forms.CachedImage() { Source = imageUrl};

    ...To download the images to respective cache. Or would it be enough to download it once - with a Xamarin.Forms.Image, or cacheImage. Can FFImageLoading cachedImage load an image that was downloaded to cache by UriImageSource (and vice versa). The images are needed to be displayed anywhere both with CachedImage and Xamarin.Forms.Image.

    On a side not I also wonder about the first line - setting a UriImageSource object to url - if is enough to download the image? Or if it also has to be set to an image object (second line) as well to be downloaded.

    Saturday, December 22, 2018 12:25 PM

All replies