Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 2.56 KB

image.md

File metadata and controls

40 lines (29 loc) · 2.56 KB

Image

Inheritance: Element -> NavigableElement -> VisualElement -> View
Xamarin.Forms documentation: Image API / Guide

For details on how the control actually works, please refer to the Xamarin.Forms documentation.

Constructors

Constructors Description
Image(aspect: Aspect, light: ImageSource, ?dark: ImageSource) Defines an Image widget with a image for light and dark mode using ImageSource
Image(aspect: Aspect, light: string, ?dark: string) Defines an Image widget with a image for light and dark mode using a path
Image(aspect: Aspect, light: Uri, ?dark: Uri) Defines a Image widget with a image for light and dark mode using an URI
Image(aspect: Aspect, light: Stream, ?dark: Stream) Defines a Image widget with a image for light and dark mode using a stream

Properties

Properties Description
isLoading(value: bool) Sets if the image is currently loading
isOpaque(value: bool) Sets if the image is opaque
reference(value: ViewRef<Image>) Sets a ViewRef instance to retrieve the Xamarin.Forms.Image instance associated to this widget

Usages

Image("image-light.png", dark = "image-dark.png")
    .isAnimationPlaying(true)
    .isOpaque(false)

Get access to the underlying Xamarin.Forms.Image

let imageRef = ViewRef<Image>()

Image("image-light.png", dark = "image-dark.png")
    .reference(imageRef)