ThicknessExtensions Class
Provides extension methods for the type System.Windows.Thickness.
public static class ThicknessExtensions
- Inheritance:
- System.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 | System.Windows.Thickness | The value on the left side of the comparison. |
right | System.Windows.Thickness | 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(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 | System.Windows.Thickness | The value to compare. |
Returns
- System.Boolean:
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 | System.Windows.Thickness | 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(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 | System.Windows.Thickness | The value to round. |
mode | RoundMode | The RoundMode to use. |
Returns
- System.Windows.Thickness:
A thickness with its values using the specified RoundMode.
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 | System.Windows.Thickness | The value to update. |
sides | Sides | The Sides to set. |
thickness | System.Double | The thickness value. |
Returns
- System.Windows.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 | System.Windows.Thickness | The value to update. |
sides | Sides | The Sides to set. |
thickness | System.Windows.Thickness | The thickness values. |
Returns
- System.Windows.Thickness:
A thickness with the specified sides 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()