Class ImageElement
- Namespace
- Northwoods.Go
- Assembly
- Northwoods.GoDiagram.Avalonia.dll
Provides some kind of visual image for a Picture, with a reference to a SkiaSharp image for drawing.
public class ImageElement
- Inheritance
-
ImageElement
- Inherited Members
Remarks
When specifying a Source, valid strings are:
- an Avalonia resource image
- an accessible image file
- a web image URL
- a base64 image string
Constructors
ImageElement(string, Bitmap)
Constructs an element to be displayed by a Picture.
public ImageElement(string uri, Bitmap img)
Parameters
uri
stringthe source attribute, which serves as an identifier
img
Bitmapthe Bitmap to be displayed
Remarks
This class should only be constructed when setting Element directly.
Properties
Height
Gets the height of the element.
public double Height { get; }
Property Value
Image
Gets the SKImage displayed by this ImageElement.
public SKImage Image { get; }
Property Value
IsComplete
Gets whether this element has completed loading, successfully or not.
public bool IsComplete { get; }
Property Value
IsLoaded
Gets whether this element loaded successfully.
public bool IsLoaded { get; }
Property Value
PlatformImage
Gets the Avalonia Bitmap displayed by this ImageElement.
public Bitmap PlatformImage { get; }
Property Value
- Bitmap
Src
Gets the URI pointing to the image.
public string Src { get; }
Property Value
Svg
Gets the SKSvg displayed by this ImageElement.
public SKSvg Svg { get; }
Property Value
- SKSvg
Remarks
This property is only set if the image source was an SVG file.
Width
Gets the width of the element.
public double Width { get; }