Xamarin.Forms.Image Class
View that holds an image.
See Also: Image
Syntax
[Xamarin.Forms.RenderWith(typeof(Xamarin.Forms.Platform._ImageRenderer))]
public class Image : View, IElementConfiguration<Image>, IImageController
public class Image : View, IElementConfiguration<Image>, IImageController
Remarks
The following example creates a new image from a file
C# Example
var image = new Image { Source = "picture.png" };
The FormsGallery sample, which can be found on the Sample Applications page, has a ImageDemoPage.cs file. This file contains a longer and more complicated example.
Requirements
Namespace: Xamarin.Forms
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0
Assembly: Xamarin.Forms.Core (in Xamarin.Forms.Core.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.2.0.0, 1.3.0.0, 1.4.0.0, 1.5.0.0, 2.0.0.0
The members of Xamarin.Forms.Image are listed below.
See Also: View
Public Constructors
Image() | Initializes a new instance of the Image class. |
Public Fields
static readonly | AspectProperty | BindableProperty. Identifies the Aspect bindable property. |
static readonly | IsLoadingProperty | BindableProperty. Identifies the IsLoading bindable property. |
static readonly | IsOpaqueProperty | BindableProperty. Backing store for the IsOpaque bindable property. |
static readonly | SourceProperty | BindableProperty. Identifies the Source bindable property. |
Public Properties
Aspect | Aspect. Gets or sets the scaling mode for the image. This is a bindable property. | |
[read-only] | IsLoading | Boolean. Gets the loading status of the image. This is a bindable property. |
IsOpaque | Boolean. Gets or sets a Boolean value that, if true hints to the rendering engine that it may safely omit drawing visual elements behind the image. | |
Source | ImageSource. Gets or sets the source of the image. This is a bindable property. |
Public Methods
On<T>()Returns the platform-specific instance of this Image, on which a platform-specific method may be called. | ||
SetIsLoading(Boolean)Sets a value that indicates whether the image is currently loading. |
Protected Methods
override | OnBindingContextChanged()Invoked when the BindingContext changes. | |
override | OnPropertyChanged(String)Invoked when a property has changed. | |
override | OnPropertyChanging(String)Invoked when a property will change. | |
override | OnSizeRequest(Double, Double)Invoked when the layotu cycle request the element desired size. |