Table of Contents

Class DrawingImage

Namespace
Avalonia.Media
Assembly
Avalonia.Base.dll

An IImage that uses a Drawing for content.

public class DrawingImage : AvaloniaObject, INotifyPropertyChanged, IImage
Inheritance
DrawingImage
Implements
Inherited Members
Extension Methods

Constructors

DrawingImage()

public DrawingImage()

DrawingImage(Drawing)

public DrawingImage(Drawing drawing)

Parameters

drawing Drawing

Fields

DrawingProperty

Defines the Drawing property.

public static readonly StyledProperty<Drawing?> DrawingProperty

Field Value

StyledProperty<Drawing>

Properties

Drawing

Gets or sets the drawing content.

[Content]
public Drawing? Drawing { get; set; }

Property Value

Drawing

Size

Gets the size of the image, in device independent pixels.

public Size Size { get; }

Property Value

Size

Methods

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.

RaiseInvalidated(EventArgs)

Raises the Invalidated event.

protected void RaiseInvalidated(EventArgs e)

Parameters

e EventArgs

The event args.

Events

Invalidated

Raised when the resource changes visually.

public event EventHandler? Invalidated

Event Type

EventHandler