Struct GridLength
Represents the length of elements that explicitly support Windows.UI.Xaml.GridUnitType.Star unit types.
Inherited Members
Namespace: System.Windows
Assembly: OpenSilver.dll
Syntax
public struct GridLength
Constructors
| Improve this Doc View SourceGridLength(Double)
Initializes a new instance of the Windows.UI.Xaml.GridLength structure using the specified absolute value in pixels.
Declaration
public GridLength(double pixels)
Parameters
Type | Name | Description |
---|---|---|
System.Double | pixels | The absolute count of pixels to establish as the value. |
GridLength(Double, GridUnitType)
Initializes a new instance of the Windows.UI.Xaml.GridLength structure and specifies what kind of value it holds.
Declaration
public GridLength(double value, GridUnitType type)
Parameters
Type | Name | Description |
---|---|---|
System.Double | value | The initial value of this instance of Windows.UI.Xaml.GridLength. |
GridUnitType | type | The Windows.UI.Xaml.GridUnitType held by this instance of Windows.UI.Xaml.GridLength. |
Properties
| Improve this Doc View SourceAuto
Gets an instance of Windows.UI.Xaml.GridLength that holds a value whose size is determined by the size properties of the content object.
Declaration
public static readonly GridLength Auto { get; }
Property Value
Type | Description |
---|---|
GridLength |
GridUnitType
Gets the associated Windows.UI.Xaml.GridUnitType for the Windows.UI.Xaml.GridLength.
Declaration
public readonly GridUnitType GridUnitType { get; }
Property Value
Type | Description |
---|---|
GridUnitType |
IsAbsolute
Gets a value that indicates whether the Windows.UI.Xaml.GridLength holds a value that is expressed in pixels.
Declaration
public readonly bool IsAbsolute { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsAuto
Gets a value that indicates whether the Windows.UI.Xaml.GridLength holds a value whose size is determined by the size properties of the content object.
Declaration
public readonly bool IsAuto { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
IsStar
Gets a value that indicates whether the Windows.UI.Xaml.GridLength holds a value that is expressed as a weighted proportion of available space.
Declaration
public readonly bool IsStar { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Value
Gets a System.Double that represents the value of the Windows.UI.Xaml.GridLength.
Declaration
public readonly double Value { get; }
Property Value
Type | Description |
---|---|
System.Double |
Methods
| Improve this Doc View SourceClone()
Returns a new instance of Gridlength with the same properties values.
Declaration
public GridLength Clone()
Returns
Type | Description |
---|---|
GridLength | A new instance of Gridlength with the same properties values. |
Equals(Object)
Determines whether the specified object is equal to the current Windows.UI.Xaml.GridLength instance.
Declaration
public override bool Equals(object oCompare)
Parameters
Type | Name | Description |
---|---|---|
System.Object | oCompare | The object to compare with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified object has the same value and Windows.UI.Xaml.GridUnitType as the current instance; otherwise, false. |
Overrides
Equals(GridLength)
Determines whether the specified Windows.UI.Xaml.GridLength is equal to the current Windows.UI.Xaml.GridLength.
Declaration
public bool Equals(GridLength gridLength)
Parameters
Type | Name | Description |
---|---|---|
GridLength | gridLength | The Windows.UI.Xaml.GridLength structure to compare with the current instance. |
Returns
Type | Description |
---|---|
System.Boolean | true if the specified Windows.UI.Xaml.GridLength has the same value and Windows.UI.Xaml.GridLength.GridUnitType as the current instance; otherwise, false. |
GetHashCode()
Gets a hash code for the Windows.UI.Xaml.GridLength.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the Windows.UI.Xaml.GridLength. |
Overrides
ToString()
Returns a System.String representation of the Windows.UI.Xaml.GridLength.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A System.String representation of the current Windows.UI.Xaml.GridLength structure. |
Overrides
Operators
| Improve this Doc View SourceEquality(GridLength, GridLength)
Compares two Windows.UI.Xaml.GridLength structures for equality.
Declaration
public static bool operator ==(GridLength gl1, GridLength gl2)
Parameters
Type | Name | Description |
---|---|---|
GridLength | gl1 | The first instance of Windows.UI.Xaml.GridLength to compare. |
GridLength | gl2 | The second instance of Windows.UI.Xaml.GridLength to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the two instances of Windows.UI.Xaml.GridLength have the same value and Windows.UI.Xaml.GridUnitType; otherwise, false. |
Inequality(GridLength, GridLength)
Compares two Windows.UI.Xaml.GridLength structures to determine if they are not equal.
Declaration
public static bool operator !=(GridLength gl1, GridLength gl2)
Parameters
Type | Name | Description |
---|---|---|
GridLength | gl1 | The first instance of Windows.UI.Xaml.GridLength to compare. |
GridLength | gl2 | The second instance of Windows.UI.Xaml.GridLength to compare. |
Returns
Type | Description |
---|---|
System.Boolean | true if the two instances of Windows.UI.Xaml.GridLength do not have the same value and Windows.UI.Xaml.GridUnitType; otherwise, false. |