Struct CornerRadius
Describes the characteristics of a rounded corner, such as can be applied to a Border.
Inherited Members
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public struct CornerRadius
Constructors
| Improve this Doc View SourceCornerRadius(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). |
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 SourceBottomLeft
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. |
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. |
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. |
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 SourceEquals(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
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. |
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
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
Operators
| Improve this Doc View SourceEquality(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. |
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. |