Summary
A few very useful extension methods
- Namespace
- MahApps
.Metro .Controls - Base Types
-
- object
graph BT
Type-->Base0["object"]
Type["Utils"]
class Type type-node
Syntax
public static class Utils
Methods
Name | Value | Summary |
---|---|---|
CollapseThickness |
Size |
Method to add up the left and right size as width, as well as the top and bottom size as height
static
|
Deflate |
Rect |
Deflates rectangle by given thickness
static
|
Inflate |
Rect |
Inflates rectangle by given thickness
static
|
IsCloseTo |
bool |
Returns whether or not two doubles are "close".
static
|
IsCloseTo |
bool |
Compares two points for fuzzy equality. This function
helps compensate for the fact that double values can
acquire error when operated upon
static
|
IsCloseTo |
bool |
Compares two rectangles for fuzzy equality. This function
helps compensate for the fact that double values can
acquire error when operated upon
static
|
IsCloseTo |
bool |
Compares two Size instances for fuzzy equality. This function
helps compensate for the fact that double values can
acquire error when operated upon
static
|
IsCloseTo |
bool |
Compares two Vector instances for fuzzy equality. This function
helps compensate for the fact that double values can
acquire error when operated upon
static
|
IsEqualTo |
bool |
Verifies if the given brush is the same as the otherBrush.
static
|
IsGreaterThan |
bool |
Returns whether or not the first double is greater than the second double.
static
|
IsLessThan |
bool |
Returns whether or not the first double is less than the second double.
static
|
IsNaN |
bool |
Faster check for NaN ( faster than double.IsNaN() )
IEEE 754 : If the argument is any value in the range 0x7ff0000000000001L through 0x7fffffffffffffffL
or in the range 0xfff0000000000001L through 0xffffffffffffffffL, the result will be NaN.
static
|
IsOne |
bool |
Returns whether or not the double is "close" to 1. Same as AreClose(double, 1),
but this is faster.
static
|
Is |
bool |
Verifies if the given brush is a SolidColorBrush and
its color does not include transparency.
static
|
IsUniform |
bool |
Verifies if the CornerRadius contains same values
static
|
IsUniform |
bool |
Verifies if all the values in Thickness are same
static
|
IsValid |
bool |
Verifies if this CornerRadius contains only valid values
The set of validity checks is passed as parameters.
static
|
IsValid |
bool |
Verifies if this Thickness contains only valid values
The set of validity checks is passed as parameters.
static
|
IsZero |
bool |
Verifies if the CornerRadius contains only zero values
static
|
IsZero |
bool |
IsZero - Returns whether or not the double is "close" to 0. Same as AreClose(double, 0),
but this is faster.
static
|
IsZero |
bool |
Verifies if the Thickness contains only zero values
static
|
RoundLayoutValue |
double |
Rounds the given value based on the DPI scale
static
|