Show / Hide Table of Contents

Struct CornerRadius

Describes the characteristics of a rounded corner, such as can be applied to a Border.

Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public struct CornerRadius

Constructors

| Improve this Doc View Source

CornerRadius(Double)

Initializes a new CornerRadius structure, applying the same uniform radius to all its corners.

Declaration
public CornerRadius(double uniformRadius)
Parameters
Type Name Description
System.Double uniformRadius

A uniform radius applied to all four CornerRadius properties (TopLeft, TopRight, BottomRight, BottomLeft).

| Improve this Doc View Source

CornerRadius(Double, Double, Double, Double)

Initializes a new instance of the CornerRadius structure, applying specific radius values to its corners.

Declaration
public CornerRadius(double topLeft, double topRight, double bottomRight, double bottomLeft)
Parameters
Type Name Description
System.Double topLeft

Sets the initial TopLeft.

System.Double topRight

Sets the initial TopRight.

System.Double bottomRight

Sets the initial BottomLeft.

System.Double bottomLeft

Sets the initial BottomRight.

Properties

| Improve this Doc View Source

BottomLeft

Gets or sets the radius of rounding, in pixels, of the bottom left corner of the object where a CornerRadius is applied.

Declaration
public double BottomLeft { readonly get; set; }
Property Value
Type Description
System.Double

A System.Double that represents the radius of rounding, in pixels, of the bottom left corner of the object where a CornerRadius is applied. The default is 0.

| Improve this Doc View Source

BottomRight

Gets or sets the radius of rounding, in pixels, of the bottom right corner of the object where a CornerRadius is applied.

Declaration
public double BottomRight { readonly get; set; }
Property Value
Type Description
System.Double

A System.Double that represents the radius of rounding, in pixels, of the bottom right corner of the object where a CornerRadius is applied. The default is 0.

| Improve this Doc View Source

TopLeft

Gets or sets the radius of rounding, in pixels, of the top left corner of the object where a CornerRadius is applied.

Declaration
public double TopLeft { readonly get; set; }
Property Value
Type Description
System.Double

A System.Double that represents the radius of rounding, in pixels, of the top left corner of the object where a CornerRadius is applied. The default is 0.

| Improve this Doc View Source

TopRight

Gets or sets the radius of rounding, in pixels, of the top right corner of the object where a CornerRadius is applied.

Declaration
public double TopRight { readonly get; set; }
Property Value
Type Description
System.Double

A System.Double that represents the radius of rounding, in pixels, of the top right corner of the object where a CornerRadius is applied. The default is 0.

Methods

| Improve this Doc View Source

Equals(Object)

Compares this CornerRadius structure to another object for equality.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

The object to compare.

Returns
Type Description
System.Boolean

true if the two objects are equal; otherwise, false.

Overrides
System.ValueType.Equals(System.Object)
| Improve this Doc View Source

Equals(CornerRadius)

Compares this CornerRadius structure to another CornerRadius structure for equality.

Declaration
public bool Equals(CornerRadius cornerRadius)
Parameters
Type Name Description
CornerRadius cornerRadius

An instance of CornerRadius to compare for equality.

Returns
Type Description
System.Boolean

true if the two instances of CornerRadius are equal; otherwise, false.

| Improve this Doc View Source

GetHashCode()

Returns the hash code of the structure.

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

A hash code for this CornerRadius.

Overrides
System.ValueType.GetHashCode()
| Improve this Doc View Source

ToString()

Returns the string representation of the CornerRadius structure.

Declaration
public override string ToString()
Returns
Type Description
System.String

A System.String that represents the CornerRadius value.

Overrides
System.ValueType.ToString()

Operators

| Improve this Doc View Source

Equality(CornerRadius, CornerRadius)

Compares the value of two CornerRadius structures for equality.

Declaration
public static bool operator ==(CornerRadius cr1, CornerRadius cr2)
Parameters
Type Name Description
CornerRadius cr1

The first structure to compare.

CornerRadius cr2

The other structure to compare.

Returns
Type Description
System.Boolean

true if the two instances of CornerRadius are equal; otherwise, false.

| Improve this Doc View Source

Inequality(CornerRadius, CornerRadius)

Compares two CornerRadius structures for inequality.

Declaration
public static bool operator !=(CornerRadius cr1, CornerRadius cr2)
Parameters
Type Name Description
CornerRadius cr1

The first structure to compare.

CornerRadius cr2

The other structure to compare.

Returns
Type Description
System.Boolean

true if the two instances of CornerRadius are not equal; otherwise, false.

  • Improve this Doc
  • View Source