ImageLoader ImageLoader Class


Network image loader, with local file system cache and in-memory cache

public class ImageLoader
type ImageLoader = class


By default, using the static public methods will use an in-memory cache

for 50 images and 4 megs total. The behavior of the static methods

can be modified by setting the public DefaultLoader property to a value

that the user configured.

The instance methods can be used to create different imageloader with

different properties.

Keep in mind that the phone does not have a lot of memory, and using

the cache with the unlimited value (0) even with a number of items in

the cache can consume memory very quickly.

Use the Purge method to release all the memory kept in the caches on

low memory conditions, or when the application is sent to the background.


ImageLoader(Int32, Int32) ImageLoader(Int32, Int32)

Creates a new instance of the image loader


BaseDir BaseDir
DefaultLoader DefaultLoader

This contains the default loader which is configured to be 50 images up to 4 megs of memory. Assigning to this property a new value will change the behavior. This property is lazyly computed, the first time an image is requested.


DefaultRequestImage(Uri, IImageUpdated) DefaultRequestImage(Uri, IImageUpdated)
Purge() Purge()

Purges the contents of the DefaultLoader

PurgeCache() PurgeCache()

Purges the cache of this instance of the ImageLoader, releasing all the memory used by the images in the caches.

RequestImage(Uri, IImageUpdated) RequestImage(Uri, IImageUpdated)

Applies to