ThicknessExtensions Class
Provides extension methods for the type Thickness.
public static class ThicknessExtensions
- Inheritance:
- object object
Methods
IsEffectivelyEqual(Thickness, Thickness)
Determines whether the two values are close enough to be considered equal.
public static bool IsEffectivelyEqual(this Thickness left, Thickness right)
Parameter | Type | Description |
---|---|---|
left | Thickness | The value on the left side of the comparison. |
right | Thickness | The value on the left side of the comparison. |
Returns
- bool:
true
if the two values are close enough to be considered equal; otherwise,false
.
IsEffectivelyUniform(Thickness)
Determines whether the values of the specified thickness are close enough to be considered uniform.
public static bool IsEffectivelyUniform(this Thickness value)
Parameter | Type | Description |
---|---|---|
value | Thickness | The value to compare. |
Returns
- bool:
true
if the values of the specified thickness are close enough to be considered uniform; otherwise,false
.
IsEffectivelyZero(Thickness)
Determines whether the specified value is close enough to zero to be considered equal.
public static bool IsEffectivelyZero(this Thickness value)
Parameter | Type | Description |
---|---|---|
value | Thickness | The value to compare with zero. |
Returns
- bool:
true
if the specified value is close enough to zero to be considered equal; otherwise,false
.
Round(Thickness, RoundMode)
Returns a thickness with its values rounded using the specified RoundMode.
public static Thickness Round(this Thickness value, RoundMode mode)
Parameter | Type | Description |
---|---|---|
value | Thickness | The value to round. |
mode | RoundMode | The RoundMode to use. |
Returns
SetSides(Thickness, Sides, double)
Returns a thickness with the specified sides set to the given value.
public static Thickness SetSides(this Thickness value, Sides sides, double thickness)
Parameter | Type | Description |
---|---|---|
value | Thickness | The value to update. |
sides | Sides | The Sides to set. |
thickness | double | The thickness value. |
Returns
- Thickness:
A thickness with the specified sides set to the given value.
SetSides(Thickness, Sides, Thickness)
Returns a thickness with the specified sides set to the given value.
public static Thickness SetSides(this Thickness value, Sides sides, Thickness thickness)
Parameter | Type | Description |
---|---|---|
value | Thickness | The value to update. |
sides | Sides | The Sides to set. |
thickness | Thickness | The thickness values. |
Returns
- Thickness:
A thickness with the specified sides set to the given value.