Table of Contents

Class RectangleGeometry

Namespace
Avalonia.Media
Assembly
Avalonia.Base.dll

Represents the geometry of a rectangle.

public class RectangleGeometry : Geometry, INotifyPropertyChanged
Inheritance
RectangleGeometry
Implements
Inherited Members
Extension Methods

Constructors

RectangleGeometry()

Initializes a new instance of the RectangleGeometry class.

public RectangleGeometry()

RectangleGeometry(Rect)

Initializes a new instance of the RectangleGeometry class.

public RectangleGeometry(Rect rect)

Parameters

rect Rect

The rectangle bounds.

RectangleGeometry(Rect, double, double)

Initializes a new instance of the RectangleGeometry class.

public RectangleGeometry(Rect rect, double radiusX, double radiusY)

Parameters

rect Rect

The rectangle bounds.

radiusX double

The radius on the X-axis used to round the corners of the rectangle.

radiusY double

The radius on the Y-axis used to round the corners of the rectangle.

Fields

RadiusXProperty

Defines the RadiusX property.

public static readonly StyledProperty<double> RadiusXProperty

Field Value

StyledProperty<double>

RadiusYProperty

Defines the RadiusY property.

public static readonly StyledProperty<double> RadiusYProperty

Field Value

StyledProperty<double>

RectProperty

Defines the Rect property.

public static readonly StyledProperty<Rect> RectProperty

Field Value

StyledProperty<Rect>

Properties

RadiusX

Gets or sets the radius on the X-axis used to round the corners of the rectangle. Corner radii are represented by an ellipse so this is the X-axis width of the ellipse.

public double RadiusX { get; set; }

Property Value

double

Remarks

In order for this property to be used, Rect must not be set (equal to the default Rect value).

RadiusY

Gets or sets the radius on the Y-axis used to round the corners of the rectangle. Corner radii are represented by an ellipse so this is the Y-axis height of the ellipse.

public double RadiusY { get; set; }

Property Value

double

Remarks

In order for this property to be used, Rect must not be set (equal to the default Rect value).

Rect

Gets or sets the bounds of the rectangle.

public Rect Rect { get; set; }

Property Value

Rect

Methods

Clone()

Clones the geometry.

public override Geometry Clone()

Returns

Geometry

A cloned geometry.