Skip to main content

CornerRadius Struct

Definition

Namespace:Avalonia
Assembly:Avalonia.Base
Package:Avalonia

Represents the radii of a rectangle's corners.

public struct CornerRadius

Inheritance: ValueType -> CornerRadius

Implements: IEquatable<CornerRadius>

Constructors

NameDescription
CornerRadius (3 overloads)No summary available.

CornerRadius overloads

CornerRadius Constructor

public CornerRadius(double uniformRadius)
Parameters

uniformRadius double

CornerRadius Constructor

public CornerRadius(double top, double bottom)
Parameters

top double

bottom double

CornerRadius Constructor

public CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft)
Parameters

topLeft double

topRight double

bottomRight double

bottomLeft double

Methods

NameDescription
Equals (2 overloads)Returns a boolean indicating whether the corner radius is equal to the other given corner radius.
GetHashCodeNo summary available.
ParseNo summary available.
ToStringNo summary available.

Equals overloads

Equals Method

Returns a boolean indicating whether the corner radius is equal to the other given corner radius.

public bool Equals(Avalonia.CornerRadius other)
Parameters

other Avalonia.CornerRadius

The other corner radius to test equality against.

Returns

bool

True if this corner radius is equal to other; False otherwise.

Equals Method

Returns a boolean indicating whether the given Object is equal to this corner radius instance.

public bool Equals(object obj)
Parameters

obj object

The Object to compare against.

Returns

bool

True if the Object is equal to this corner radius; False otherwise.

GetHashCode Method

public int GetHashCode()

Returns

int

Parse Method

public Avalonia.CornerRadius Parse(string s)

Parameters

s string

Returns

Avalonia.CornerRadius

ToString Method

public string ToString()

Returns

string

Properties

NameDescription
BottomLeftRadius of the bottom left corner.
BottomRightRadius of the bottom right corner.
IsUniformGets a value indicating whether all corner radii are equal.
TopLeftRadius of the top left corner.
TopRightRadius of the top right corner.

BottomLeft Property

Radius of the bottom left corner.

public double BottomLeft { get; set; }

BottomRight Property

Radius of the bottom right corner.

public double BottomRight { get; set; }

IsUniform Property

Gets a value indicating whether all corner radii are equal.

public bool IsUniform { get; set; }

TopLeft Property

Radius of the top left corner.

public double TopLeft { get; set; }

TopRight Property

Radius of the top right corner.

public double TopRight { get; set; }