ImageEx Class

Definition

The ImageEx control extends the default Image platform control improving the performance and responsiveness of your Apps. Source images are downloaded asynchronously showing a load indicator while in progress. Once downloaded, the source image is stored in the App local cache to preserve resources and load time next time the image needs to be displayed.

public class ImageEx : Microsoft.Toolkit.Uwp.UI.Controls.ImageExBase
type ImageEx = class
    inherit ImageExBase
Public Class ImageEx
Inherits ImageExBase
Inheritance
Windows.UI.Xaml.Controls.Control
ImageEx

Constructors

ImageEx()

Initializes a new instance of the ImageEx class.

Fields

CommonGroup

VisualStates name in template

(Inherited from ImageExBase)
FailedState

Failed name in template

(Inherited from ImageExBase)
LoadedState

Loaded state name in template

(Inherited from ImageExBase)
LoadingState

Loading state name in template

(Inherited from ImageExBase)
NineGridProperty

Identifies the NineGrid dependency property.

PartImage

Image name in template

(Inherited from ImageExBase)
PartProgress

ProgressRing name in template

(Inherited from ImageExBase)
UnloadedState

Unloaded state name in template

(Inherited from ImageExBase)

Properties

CachingStrategy

Gets or sets a value indicating how the ImageEx will be cached.

(Inherited from ImageExBase)
CornerRadius

Gets or sets the CornerRadius for underlying image.

Used to created rounded/circular images. (Inherited from ImageExBase)
DecodePixelHeight

Gets or sets DecodePixelHeight for underlying bitmap

(Inherited from ImageExBase)
DecodePixelType

Gets or sets DecodePixelType for underlying bitmap

(Inherited from ImageExBase)
DecodePixelWidth

Gets or sets DecodePixelWidth for underlying bitmap

(Inherited from ImageExBase)
EnableLazyLoading

Gets or sets a value indicating whether gets or sets is lazy loading enable. (17763 or higher supported)

(Inherited from ImageExBase)
Image

Gets the backing image object

(Inherited from ImageExBase)
IsCacheEnabled

Gets or sets a value indicating whether gets or sets cache state

(Inherited from ImageExBase)
IsInitialized

Gets a value indicating whether control has been initialized.

(Inherited from ImageExBase)
LazyLoadingThreshold

Gets or sets a value indicating the threshold for triggering lazy loading.

(Inherited from ImageExBase)
LockObj

Gets object used for lock

(Inherited from ImageExBase)
NineGrid

Gets or sets the nine-grid used by the image.

PlaceholderSource

Gets or sets the placeholder source.

(Inherited from ImageExBase)
PlaceholderStretch

Gets or sets the placeholder stretch.

(Inherited from ImageExBase)
Progress

Gets backing object for the ProgressRing

(Inherited from ImageExBase)
Source

Gets or sets the source used by the image

(Inherited from ImageExBase)
Stretch

Gets or sets the stretch behavior of the image

(Inherited from ImageExBase)
WaitUntilLoaded

Gets a value indicating whether the AlphaMask needs to be retrieved after the element has loaded.

(Inherited from ImageExBase)

Methods

ArrangeOverride(Size) (Inherited from ImageExBase)
AttachImageFailed(ExceptionRoutedEventHandler)

Attach image failed event handler

(Inherited from ImageExBase)
AttachImageOpened(RoutedEventHandler)

Attach image opened event handler

(Inherited from ImageExBase)
GetAlphaMask()

Returns a mask that represents the alpha channel of an image as a Windows.UI.Composition.CompositionBrush

GetAsCastingSource()

Returns the image as a Windows.Media.Casting.CastingSource.

OnApplyTemplate()

Update the visual state of the control when its template is changed.

(Inherited from ImageExBase)
OnImageFailed(Object, ExceptionRoutedEventArgs)

Underlying Windows.UI.Xaml.Controls.Image.ImageFailed event handler.

(Inherited from ImageExBase)
OnImageOpened(Object, RoutedEventArgs)

Underlying Windows.UI.Xaml.Controls.Image.ImageOpened event handler.

(Inherited from ImageExBase)
OnPlaceholderSourceChanged(DependencyPropertyChangedEventArgs)

Invoked when Placeholder source has changed

(Inherited from ImageExBase)
ProvideCachedResourceAsync(Uri, CancellationToken)

This method is provided in case a developer would like their own custom caching strategy for ImageExBase. By default it uses the built-in UWP cache provided by Windows.UI.Xaml.Media.Imaging.BitmapImage and the Image control itself. This method should return an Windows.UI.Xaml.Media.ImageSource value of the image specified by the provided uri parameter. A CancellationToken is provided in case the current request is invalidated (e.g. the container is recycled before the original image is loaded). The Toolkit also has an image cache helper which can be used as well: GetFromCacheAsync(Uri, Boolean, CancellationToken, List<KeyValuePair<String,Object>>) in ImageCache.

(Inherited from ImageExBase)
RemoveImageFailed(ExceptionRoutedEventHandler)

Remove Image Failed handler

(Inherited from ImageExBase)
RemoveImageOpened(RoutedEventHandler)

Remove image opened handler

(Inherited from ImageExBase)

Events

ImageExFailed

Event raised if the image failed loading.

(Inherited from ImageExBase)
ImageExInitialized

Event raised when the control is initialized.

(Inherited from ImageExBase)
ImageExOpened

Event raised when the image is successfully loaded and opened.

(Inherited from ImageExBase)

Applies to