ImageEx Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 : CommunityToolkit.WinUI.UI.Controls.ImageExBase
type ImageEx = class
inherit ImageExBase
Public Class ImageEx
Inherits ImageExBase
- Inheritance
Common |
VisualStates name in template (Inherited from ImageExBase) |
Failed |
Failed name in template (Inherited from ImageExBase) |
Loaded |
Loaded state name in template (Inherited from ImageExBase) |
Loading |
Loading state name in template (Inherited from ImageExBase) |
Nine |
Identifies the NineGrid dependency property. |
Part |
Image name in template (Inherited from ImageExBase) |
Unloaded |
Unloaded state name in template (Inherited from ImageExBase) |
Decode |
Gets or sets DecodePixelHeight for underlying bitmap (Inherited from ImageExBase) |
Decode |
Gets or sets DecodePixelType for underlying bitmap (Inherited from ImageExBase) |
Decode |
Gets or sets DecodePixelWidth for underlying bitmap (Inherited from ImageExBase) |
Enable |
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) |
Is |
Gets or sets a value indicating whether gets or sets cache state (Inherited from ImageExBase) |
Is |
Gets a value indicating whether control has been initialized. (Inherited from ImageExBase) |
Lazy |
Gets or sets a value indicating the threshold for triggering lazy loading. (Inherited from ImageExBase) |
Nine |
Gets or sets the nine-grid used by the image. |
Placeholder |
Gets or sets the placeholder source. (Inherited from ImageExBase) |
Placeholder |
Gets or sets the placeholder stretch. (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) |
Attach |
Attach image failed event handler (Inherited from ImageExBase) |
Attach |
Attach image opened event handler (Inherited from ImageExBase) |
Get |
Returns a mask that represents the alpha channel of an image as a Microsoft.UI.Composition.CompositionBrush |
Get |
Returns the image as a Windows.Media.Casting.CastingSource. |
On |
Update the visual state of the control when its template is changed. (Inherited from ImageExBase) |
On |
Underlying Microsoft.UI.Xaml.Controls.Image.ImageFailed event handler. (Inherited from ImageExBase) |
On |
Underlying Microsoft.UI.Xaml.Controls.Image.ImageOpened event handler. (Inherited from ImageExBase) |
On |
Invoked when Placeholder source has changed (Inherited from ImageExBase) |
Provide |
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 Microsoft.UI.Xaml.Media.Imaging.BitmapImage and the Image control itself. This method should return an Microsoft.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) |
Remove |
Remove Image Failed handler (Inherited from ImageExBase) |
Remove |
Remove image opened handler (Inherited from ImageExBase) |
Image |
Event raised if the image failed loading. (Inherited from ImageExBase) |
Image |
Event raised when the control is initialized. (Inherited from ImageExBase) |
Image |
Event raised when the image is successfully loaded and opened. (Inherited from ImageExBase) |
Produit | Versions |
---|---|
Windows Community Toolkit | 7.0.0 |