Struct GridLength
Implements special length structure for Grid
Implements
Inherited Members
Namespace: EmptyKeys.UserInterface
Assembly: EmptyKeys.UserInterface.dll
Syntax
public struct GridLength : IEquatable<GridLength>
Constructors
GridLength(Single)
Initializes a new instance of the GridLength structure
Declaration
public GridLength(float pixels)
Parameters
Type | Name | Description |
---|---|---|
System.Single | pixels | The pixels. |
GridLength(Single, GridUnitType)
Initializes a new instance of the GridLength structure
Declaration
public GridLength(float value, GridUnitType valueType)
Parameters
Type | Name | Description |
---|---|---|
System.Single | value | The value. |
GridUnitType | valueType | Type of the value. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | Value can't be NaN! or Value can't be infinity! |
Properties
Auto
Gets the Auto value for Grid Length
Declaration
public static GridLength Auto { get; }
Property Value
Type | Description |
---|---|
GridLength | Auto value |
GridUnitType
Gets the type of the grid unit.
Declaration
public GridUnitType GridUnitType { get; }
Property Value
Type | Description |
---|---|
GridUnitType | The type of the grid unit. |
IsAbsolute
Gets a value indicating whether this instance is absolute value in pixels
Declaration
public bool IsAbsolute { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsAuto
Gets a value indicating whether this instance is automatic value
Declaration
public bool IsAuto { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
IsStar
Gets a value indicating whether this instance is star (fill the rest value)
Declaration
public bool IsStar { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
Value
Gets the value.
Declaration
public float Value { get; }
Property Value
Type | Description |
---|---|
System.Single | The value. |
Methods
Equals(GridLength)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(GridLength other)
Parameters
Type | Name | Description |
---|---|---|
GridLength | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Object)
Determines whether the specified System.Object, is equal to this instance.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The System.Object to compare with this instance. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Overrides
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
Overrides
ToString()
Returns a System.String that represents this instance.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String that represents this instance. |
Overrides
Operators
Equality(GridLength, GridLength)
Implements the operator ==.
Declaration
public static bool operator ==(GridLength gridLength1, GridLength gridLength2)
Parameters
Type | Name | Description |
---|---|---|
GridLength | gridLength1 | The grid length. |
GridLength | gridLength2 | The grid length. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
Inequality(GridLength, GridLength)
Implements the operator !=.
Declaration
public static bool operator !=(GridLength gridLength1, GridLength gridLength2)
Parameters
Type | Name | Description |
---|---|---|
GridLength | gridLength1 | The grid length. |
GridLength | gridLength2 | The grid length. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |