githubEdit

FFImageLoading

The FFImageLoading plugin allows you to cache images as opposed to wasting time and memory with the built-in Image view. Using FFImageLoading, you have an easy way to cache images in your Fabulous.XamarinForms application.

FFImageLoading was created by Daniel Luberda and Fabien Molinet. The original project can be found in this github repositoryarrow-up-right.

The nuget Fabulous.XamarinForms.FFImageLoadingarrow-up-right implements a view component for the type CachedImagearrow-up-right.

Source: The FFImageLoading github project by Daniel Luberda and Fabien Molinet

Installation

To use Fabulous.XamarinForms.FFImageLoading, you must:

  1. Add a reference to this NuGet packagearrow-up-right across your whole solution. This will add appropriate references to your platform-specific Android, iOS, UWP, WPF etc projects too.

  2. Add this line to your platform specific projects (AppDelegate.fs, MainActivity.fs, MainPage.xaml.cs, etc) before you use FFImageLoading:

  • If you’re using Android:

  • If you’re using non-Android platforms:

  1. Use CachedImage in your view function. Here is a simple example of using CachedImage to display a scenic image:

Performance considerations

Use FileImageSource, UriImageSource or FFImageLoading’s EmbeddedResourceImageSource instead of StreamImageSource or ImageSource.FromResource to ensure the images are cached properly. Read more here on the FFImageLoading wikiarrow-up-right

Last updated