C# Class FFImageLoading.Forms.CachedImage

CachedImage - Xamarin.Forms image replacement with caching and downsampling capabilities
Inheritance: Xamarin.Forms.View
ファイルを表示 Open project: daniel-luberda/FFImageLoading Class Usage Examples

Public Properties

Property Type Description
AspectProperty BindableProperty
BitmapOptimizationsProperty BindableProperty
CacheDurationProperty BindableProperty
CacheTypeProperty BindableProperty
DownloadStartedCommandProperty BindableProperty
DownsampleHeightProperty BindableProperty
DownsampleToViewSizeProperty BindableProperty
DownsampleUseDipUnitsProperty BindableProperty
DownsampleWidthProperty BindableProperty
ErrorCommandProperty BindableProperty
ErrorPlaceholderProperty BindableProperty
FadeAnimationEnabledProperty BindableProperty
FinishCommandProperty BindableProperty
IsLoadingProperty BindableProperty
IsLoadingPropertyKey BindablePropertyKey
IsOpaqueProperty BindableProperty
LoadingDelayProperty BindableProperty
LoadingPlaceholderProperty BindableProperty
LoadingPriorityProperty BindableProperty
RetryCountProperty BindableProperty
RetryDelayProperty BindableProperty
SourceProperty BindableProperty
SuccessCommandProperty BindableProperty
TransformPlaceholdersProperty BindableProperty
TransformationsProperty BindableProperty

Private Properties

Property Type Description
HandleTransformationsPropertyChangedDelegate void
OnDownloadStarted void
OnError void
OnFinish void
OnSizeRequest SizeRequest
OnSourcePropertyChanged void
OnSuccess void

Public Methods

Method Description
CachedImage ( ) : System
Cancel ( ) : void

Cancels image loading tasks

GetImageAsJpgAsync ( int quality = 90, int desiredWidth, int desiredHeight ) : Task

Gets the image as JPG.

GetImageAsPngAsync ( int desiredWidth, int desiredHeight ) : Task

Gets the image as PNG

InvalidateCache ( Xamarin.Forms.ImageSource source, Cache cacheType, bool removeSimilar = false ) : System.Threading.Tasks.Task

Invalidates cache for a specified image source.

InvalidateCache ( string key, Cache cacheType, bool removeSimilar = false ) : System.Threading.Tasks.Task

Invalidates cache for a specified key.

ReloadImage ( ) : void

Reloads the image.

Protected Methods

Method Description
OnBindingContextChanged ( ) : void

Private Methods

Method Description
HandleTransformationsPropertyChangedDelegate ( BindableObject bindable, object oldValue, object newValue ) : void
OnDownloadStarted ( CachedImageEvents e ) : void
OnError ( CachedImageEvents e ) : void
OnFinish ( CachedImageEvents e ) : void
OnSizeRequest ( double widthConstraint, double heightConstraint ) : SizeRequest
OnSourcePropertyChanged ( BindableObject bindable, object oldValue, object newValue ) : void
OnSuccess ( CachedImageEvents e ) : void

Method Details

CachedImage() public method

public CachedImage ( ) : System
return System

Cancel() public method

Cancels image loading tasks
public Cancel ( ) : void
return void

GetImageAsJpgAsync() public method

Gets the image as JPG.
public GetImageAsJpgAsync ( int quality = 90, int desiredWidth, int desiredHeight ) : Task
quality int
desiredWidth int
desiredHeight int
return Task

GetImageAsPngAsync() public method

Gets the image as PNG
public GetImageAsPngAsync ( int desiredWidth, int desiredHeight ) : Task
desiredWidth int
desiredHeight int
return Task

InvalidateCache() public static method

Invalidates cache for a specified image source.
public static InvalidateCache ( Xamarin.Forms.ImageSource source, Cache cacheType, bool removeSimilar = false ) : System.Threading.Tasks.Task
source Xamarin.Forms.ImageSource Image source.
cacheType Cache Cache type.
removeSimilar bool If set to true removes all image cache variants /// (downsampling and transformations variants)
return System.Threading.Tasks.Task

InvalidateCache() public static method

Invalidates cache for a specified key.
public static InvalidateCache ( string key, Cache cacheType, bool removeSimilar = false ) : System.Threading.Tasks.Task
key string
cacheType Cache Cache type.
removeSimilar bool If set to true removes all image cache variants /// (downsampling and transformations variants)
return System.Threading.Tasks.Task

OnBindingContextChanged() protected method

protected OnBindingContextChanged ( ) : void
return void

ReloadImage() public method

Reloads the image.
public ReloadImage ( ) : void
return void

Property Details

AspectProperty public_oe static_oe property

The aspect property.
public static BindableProperty AspectProperty
return BindableProperty

BitmapOptimizationsProperty public_oe static_oe property

The bitmap optimizations property.
public static BindableProperty BitmapOptimizationsProperty
return BindableProperty

CacheDurationProperty public_oe static_oe property

The cache duration property.
public static BindableProperty CacheDurationProperty
return BindableProperty

CacheTypeProperty public_oe static_oe property

The cache type property.
public static BindableProperty CacheTypeProperty
return BindableProperty

DownloadStartedCommandProperty public_oe static_oe property

The DownloadStartedCommandProperty.
public static BindableProperty DownloadStartedCommandProperty
return BindableProperty

DownsampleHeightProperty public_oe static_oe property

The downsample height property.
public static BindableProperty DownsampleHeightProperty
return BindableProperty

DownsampleToViewSizeProperty public_oe static_oe property

The downsample to view size property.
public static BindableProperty DownsampleToViewSizeProperty
return BindableProperty

DownsampleUseDipUnitsProperty public_oe static_oe property

The downsample use dip units property.
public static BindableProperty DownsampleUseDipUnitsProperty
return BindableProperty

DownsampleWidthProperty public_oe static_oe property

The downsample width property.
public static BindableProperty DownsampleWidthProperty
return BindableProperty

ErrorCommandProperty public_oe static_oe property

The ErrorCommandProperty.
public static BindableProperty ErrorCommandProperty
return BindableProperty

ErrorPlaceholderProperty public_oe static_oe property

The error placeholder property.
public static BindableProperty ErrorPlaceholderProperty
return BindableProperty

FadeAnimationEnabledProperty public_oe static_oe property

The fade animation enabled property.
public static BindableProperty FadeAnimationEnabledProperty
return BindableProperty

FinishCommandProperty public_oe static_oe property

The FinishCommandProperty.
public static BindableProperty FinishCommandProperty
return BindableProperty

IsLoadingProperty public_oe static_oe property

The is loading property.
public static BindableProperty IsLoadingProperty
return BindableProperty

IsLoadingPropertyKey public_oe static_oe property

The is loading property key.
public static BindablePropertyKey IsLoadingPropertyKey
return BindablePropertyKey

IsOpaqueProperty public_oe static_oe property

The is opaque property.
public static BindableProperty IsOpaqueProperty
return BindableProperty

LoadingDelayProperty public_oe static_oe property

The loading delay property.
public static BindableProperty LoadingDelayProperty
return BindableProperty

LoadingPlaceholderProperty public_oe static_oe property

The loading placeholder property.
public static BindableProperty LoadingPlaceholderProperty
return BindableProperty

LoadingPriorityProperty public_oe static_oe property

The loading priority property.
public static BindableProperty LoadingPriorityProperty
return BindableProperty

RetryCountProperty public_oe static_oe property

The retry count property.
public static BindableProperty RetryCountProperty
return BindableProperty

RetryDelayProperty public_oe static_oe property

The retry delay property.
public static BindableProperty RetryDelayProperty
return BindableProperty

SourceProperty public_oe static_oe property

The source property.
public static BindableProperty SourceProperty
return BindableProperty

SuccessCommandProperty public_oe static_oe property

The SuccessCommandProperty.
public static BindableProperty SuccessCommandProperty
return BindableProperty

TransformPlaceholdersProperty public_oe static_oe property

The TransformPlaceholders property.
public static BindableProperty TransformPlaceholdersProperty
return BindableProperty

TransformationsProperty public_oe static_oe property

The transformations property.
public static BindableProperty TransformationsProperty
return BindableProperty