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
CornerRadius(double, double, double, double)
public CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft)
Parameters
Properties
BottomLeft
Radius of the bottom left corner.
public double BottomLeft { get; }
Property Value
BottomRight
Radius of the bottom right corner.
public double BottomRight { get; }
Property Value
IsUniform
Gets a value indicating whether all corner radii are equal.
public bool IsUniform { get; }
Property Value
TopLeft
Radius of the top left corner.
public double TopLeft { get; }
Property Value
TopRight
Radius of the top right corner.
public double TopRight { get; }
Property Value
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
CornerRadiusThe 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
objectThe Object to compare against.
Returns
- bool
True if the Object is equal to this corner radius; False otherwise.
GetHashCode()
public override int GetHashCode()
Returns
Parse(string)
public static CornerRadius Parse(string s)
Parameters
s
string
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(CornerRadius, CornerRadius)
public static bool operator ==(CornerRadius left, CornerRadius right)
Parameters
left
CornerRadiusright
CornerRadius
Returns
operator !=(CornerRadius, CornerRadius)
public static bool operator !=(CornerRadius left, CornerRadius right)
Parameters
left
CornerRadiusright
CornerRadius