Skip to main content

DrawingImage Class

Definition

Namespace:Avalonia.Media
Assembly:Avalonia.Base
Package:Avalonia
public class DrawingImage

Inheritance: object -> AvaloniaObject -> DrawingImage

Implements: IAffectsRender, IImage

Constructors

NameDescription
DrawingImage (2 overloads)No summary available.

DrawingImage overloads

DrawingImage Constructor

public DrawingImage()

DrawingImage Constructor

public DrawingImage(Avalonia.Media.Drawing drawing)
Parameters

drawing Avalonia.Media.Drawing

Methods

NameDescription
Bind (8 overloads)Binds a Avalonia.AvaloniaProperty to an Avalonia.Data.BindingBase. Inherited from AvaloniaObject.
CheckAccessReturns a value indicating whether the current thread is the UI thread. Inherited from AvaloniaObject.
ClearValue (4 overloads)Clears a Avalonia.AvaloniaProperty's local value. Inherited from AvaloniaObject.
CoerceValueCoerces the specified Avalonia.AvaloniaProperty. Inherited from AvaloniaObject.
EqualsCompares two objects using reference equality. Inherited from AvaloniaObject.
GetBaseValueInherited from AvaloniaObject.
GetHashCodeGets the hash code for the object. Inherited from AvaloniaObject.
GetValue (3 overloads)Gets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
IsAnimatingChecks whether a Avalonia.AvaloniaProperty is animating. Inherited from AvaloniaObject.
IsSetChecks whether a Avalonia.AvaloniaProperty is set on this object. Inherited from AvaloniaObject.
SetCurrentValue (2 overloads)Sets the value of a dependency property without changing its value source. Inherited from AvaloniaObject.
SetValue (3 overloads)Sets a Avalonia.AvaloniaProperty value. Inherited from AvaloniaObject.
VerifyAccessChecks that the current thread is the UI thread and throws if not. Inherited from AvaloniaObject.

Properties

NameDescription
DrawingGets or sets the drawing content.
SizeGets the size of the image, in device independent pixels.
ViewboxGets or sets a rectangular region of Avalonia.Media.DrawingImage.Drawing, in device independent pixels, to display when rendering this image.
DispatcherReturns the Avalonia.AvaloniaObject.Dispatcher that this Avalonia.AvaloniaObject is associated with. Inherited from AvaloniaObject.
ItemInherited from AvaloniaObject.

Drawing Property

Gets or sets the drawing content.

public Avalonia.Media.Drawing Drawing { get; set; }

Size Property

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

public Avalonia.Size Size { get; set; }

Viewbox Property

Gets or sets a rectangular region of Avalonia.Media.DrawingImage.Drawing, in device independent pixels, to display when rendering this image.

public Nullable<Avalonia.Rect> Viewbox { get; set; }

Remarks

This value can be used to display only part of Avalonia.Media.DrawingImage.Drawing, or to surround it with empty space. If null, Avalonia.Media.DrawingImage.Drawing will provide its own viewbox.

See also

Fields

DrawingProperty Field

Defines the Avalonia.Media.DrawingImage.Drawing property.

public Avalonia.StyledProperty<TValue><Avalonia.Media.Drawing> DrawingProperty

ViewboxProperty Field

Defines the Avalonia.Media.DrawingImage.Viewbox property.

public Avalonia.StyledProperty<TValue><Nullable<Avalonia.Rect>> ViewboxProperty

Events

NameDescription
InvalidatedNo summary available.
PropertyChangedRaised when a Avalonia.AvaloniaProperty value changes on this object. Inherited from AvaloniaObject.

Invalidated Event

public event EventHandler Invalidated