Table of Contents

Struct CornerRadius

Namespace
Avalonia
Assembly
Avalonia.Base.dll

Represents the radii of a rectangle's corners.

public readonly struct CornerRadius : IEquatable<CornerRadius>
Implements
Inherited Members

Constructors

CornerRadius(double)

public CornerRadius(double uniformRadius)

Parameters

uniformRadius double

CornerRadius(double, double)

public CornerRadius(double top, double bottom)

Parameters

top double
bottom double

CornerRadius(double, double, double, double)

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

Parameters

topLeft double
topRight double
bottomRight double
bottomLeft double

Properties

BottomLeft

Radius of the bottom left corner.

public double BottomLeft { get; }

Property Value

double

BottomRight

Radius of the bottom right corner.

public double BottomRight { get; }

Property Value

double

IsUniform

Gets a value indicating whether all corner radii are equal.

public bool IsUniform { get; }

Property Value

bool

TopLeft

Radius of the top left corner.

public double TopLeft { get; }

Property Value

double

TopRight

Radius of the top right corner.

public double TopRight { get; }

Property Value

double

Methods

Equals(CornerRadius)

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

public bool Equals(CornerRadius other)

Parameters

other CornerRadius

The other corner radius to test equality against.

Returns

bool

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

Equals(object?)

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

public override 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()

public override int GetHashCode()

Returns

int

Parse(string)

public static CornerRadius Parse(string s)

Parameters

s string

Returns

CornerRadius

ToString()

public override string ToString()

Returns

string

Operators

operator ==(CornerRadius, CornerRadius)

public static bool operator ==(CornerRadius left, CornerRadius right)

Parameters

left CornerRadius
right CornerRadius

Returns

bool

operator !=(CornerRadius, CornerRadius)

public static bool operator !=(CornerRadius left, CornerRadius right)

Parameters

left CornerRadius
right CornerRadius

Returns

bool