ImageSources
The .NET Multi-platform App UI (.NET MAUI) Image
displays an image that can be loaded from a local file, a URI, an embedded resource, or a stream. The standard platform image formats are supported, including animated GIFs, and local Scalable Vector Graphics (SVG) files are also supported. For more information about the Image
control, see Image.
Any control that has a property of type ImageSource
, can specify the source of an image. The ImageSource
property has the following methods that can be used to load an image from different sources:
FromFile
returns aFileImageSource
that reads an image from a local file.FromUri
returns anUriImageSource
that downloads and reads an image from a specified URI.FromResource
returns aStreamImageSource
that reads an image file embedded in an assembly.FromStream
returns aStreamImageSource
that reads an image from a stream that supplies image data.
.NET MAUI Community Toolkit ImageSources
The .NET MAUI Community Toolkit provides a collection of additional pre-built, reusable ImageSources
to make developers lives easier. Here are the sources provided by the toolkit:
View | Description |
---|---|
GravatarImageSource |
The GravatarImageSource provides an Image source to display a users Gravatar registered image via their email address. |
.NET MAUI Community Toolkit
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for