CornerRadiusExtensions Class
Provides extension methods for the type System.Windows.CornerRadius.
public static class CornerRadiusExtensions
- Inheritance:
- System.Object Object
Methods
IsEffectivelyEqual(CornerRadius, CornerRadius)
Determines whether the two values are close enough to be considered equal.
public static bool IsEffectivelyEqual(this CornerRadius left, CornerRadius right)
Parameter | Type | Description |
---|---|---|
left | System.Windows.CornerRadius | The value on the left side of the comparison. |
right | System.Windows.CornerRadius | The value on the left side of the comparison. |
Returns
- System.Boolean:
true
if the two values are close enough to be considered equal; otherwise,false
.
IsEffectivelyUniform(CornerRadius)
Determines whether the values of the specified corner radius are close enough to be considered uniform.
public static bool IsEffectivelyUniform(this CornerRadius value)
Parameter | Type | Description |
---|---|---|
value | System.Windows.CornerRadius | The value to compare. |
Returns
- System.Boolean:
true
if the values of the specified corner radius are close enough to be considered uniform; otherwise,false
.
IsEffectivelyZero(CornerRadius)
Determines whether the specified value is close enough to zero to be considered equal.
public static bool IsEffectivelyZero(this CornerRadius value)
Parameter | Type | Description |
---|---|---|
value | System.Windows.CornerRadius | The value to compare with zero. |
Returns
- System.Boolean:
true
if the specified value is close enough to zero to be considered equal; otherwise,false
.
Round(CornerRadius, RoundMode)
Returns a corner radius with its values rounded using the specified RoundMode.
public static CornerRadius Round(this CornerRadius value, RoundMode mode)
Parameter | Type | Description |
---|---|---|
value | System.Windows.CornerRadius | The value to round. |
mode | RoundMode | The RoundMode to use. |
Returns
- System.Windows.CornerRadius:
A corner radius with its values using the specified RoundMode.
SetCorners(CornerRadius, Corners, Double)
Returns a corner radius with the specified corners set to the given value.
public static CornerRadius SetCorners(this CornerRadius value, Corners corners, double radius)
Parameter | Type | Description |
---|---|---|
value | System.Windows.CornerRadius | The value to update. |
corners | Corners | The Corners to set. |
radius | System.Double | The radius value. |
Returns
- System.Windows.CornerRadius:
A corner radius with the specified corners set to the given value.
SetCorners(CornerRadius, Corners, CornerRadius)
Returns a corner radius with the specified corners set to the given value.
public static CornerRadius SetCorners(this CornerRadius value, Corners corners, CornerRadius radius)
Parameter | Type | Description |
---|---|---|
value | System.Windows.CornerRadius | The value to update. |
corners | Corners | The Corners to set. |
radius | System.Windows.CornerRadius | The radius values. |
Returns
- System.Windows.CornerRadius:
A corner radius with the specified corners set to the given value.
Inherited Members
- System.Object.ToString()
- System.Object.Equals(System.Object)
- System.Object.Equals(System.Object, System.Object)
- System.Object.ReferenceEquals(System.Object, System.Object)
- System.Object.GetHashCode()
- System.Object.GetType()
- System.Object.MemberwiseClone()