Grid​Length​Helper Grid​Length​Helper Grid​Length​Helper Class

Definition

Provides helper methods to evaluate or set GridLength values. C# and Microsoft Visual Basic code should use methods of GridLength instead.

public sealed class GridLengthHelper : IGridLengthHelperpublic sealed class GridLengthHelper : IGridLengthHelperPublic NotInheritable Class GridLengthHelper Implements IGridLengthHelper
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Remarks

GridLength is a Windows Runtime structure that represents a factor for available-space measurements in rows or columns of a Grid.

GridLengthHelper is one of several Helper classes that are intended to provide utility methods for Windows Runtime structure values. C# and Microsoft Visual Basic code can use members of GridLength instead, because utility members are available directly on the structure due to .NET Framework runtime support. C++ code can only access the Value data value on GridLength. For C++ developers, approximately the same utility features that a Microsoft Visual Basic developer could use directly on GridLength are available in a static form on the GridLengthHelper class.

Properties

Auto Auto Auto

Gets a static GridLength value that corresponds to the special "Auto" value. C# and Microsoft Visual Basic code should use Auto instead.

public static GridLength Auto { get; }public static GridLength Auto { get; }Public Static ReadOnly Property Auto As GridLength
Value
GridLength GridLength GridLength

A GridLength value that corresponds to the special "Auto" value.

Attributes

Methods

Equals(GridLength, GridLength) Equals(GridLength, GridLength) Equals(GridLength, GridLength)

Provides comparison of the values of two GridLength values. C# and Microsoft Visual Basic code should use the = operator instead.

public static bool Equals(GridLength target, GridLength value)public static bool Equals(GridLength target, GridLength value)Public Static Function Equals(target As GridLength, value As GridLength) As bool
Parameters
target
GridLength GridLength GridLength

The first GridLength to compare.

value
GridLength GridLength GridLength

The second GridLength to compare.

Returns
bool bool bool

true if the two GridLength values hold equivalent values as their structure value information; otherwise, false.

Attributes
See Also

FromPixels(Double) FromPixels(Double) FromPixels(Double)

Creates a new GridLength value based on a fixed number of pixels. C# and Microsoft Visual Basic code should use GridLength(Double) instead.

public static GridLength FromPixels(Double pixels)public static GridLength FromPixels(Double pixels)Public Static Function FromPixels(pixels As Double) As GridLength
Parameters
pixels
System.Double System.Double System.Double

The pixel height or width to specify.

Returns
Attributes

FromValueAndType(Double, GridUnitType) FromValueAndType(Double, GridUnitType) FromValueAndType(Double, GridUnitType)

Creates a new GridLength value based on a possible number of pixels, and a GridUnitType. C# and Microsoft Visual Basic code should use GridLength(Double,GridUnitType) instead.

public static GridLength FromValueAndType(Double value, GridUnitType type)public static GridLength FromValueAndType(Double value, GridUnitType type)Public Static Function FromValueAndType(value As Double, type As GridUnitType) As GridLength
Parameters
value
System.Double System.Double System.Double

A numeric value. This might be a pixel height or width to specify, if type is specified as Pixel, or a factor, if type is specified as Star. This value is ignored if type is specified as Auto.

type
GridUnitType GridUnitType GridUnitType

A value of the enumeration that specifies which unit type the GridLength represents.

Returns
Attributes

GetIsAbsolute(GridLength) GetIsAbsolute(GridLength) GetIsAbsolute(GridLength)

Returns whether the evaluated GridLength is the special "Absolute" value. C# and Microsoft Visual Basic code should use IsAbsolute instead.

public static bool GetIsAbsolute(GridLength target)public static bool GetIsAbsolute(GridLength target)Public Static Function GetIsAbsolute(target As GridLength) As bool
Parameters
target
GridLength GridLength GridLength

The GridLength to evaluate.

Returns
bool bool bool

true if the evaluated GridLength is the special "Absolute" value; otherwise, false.

Attributes

GetIsAuto(GridLength) GetIsAuto(GridLength) GetIsAuto(GridLength)

Returns whether the evaluated GridLength is the special "Auto" value. C# and Microsoft Visual Basic code should use IsAuto instead.

public static bool GetIsAuto(GridLength target)public static bool GetIsAuto(GridLength target)Public Static Function GetIsAuto(target As GridLength) As bool
Parameters
target
GridLength GridLength GridLength

The GridLength to evaluate.

Returns
bool bool bool

true if the evaluated GridLength is the special "Auto" value; otherwise, false.

Attributes

GetIsStar(GridLength) GetIsStar(GridLength) GetIsStar(GridLength)

Returns whether the evaluated GridLength is the special "*" (star sizing) value. C# and Microsoft Visual Basic code should use IsStar instead.

public static bool GetIsStar(GridLength target)public static bool GetIsStar(GridLength target)Public Static Function GetIsStar(target As GridLength) As bool
Parameters
target
GridLength GridLength GridLength

The GridLength to evaluate.

Returns
bool bool bool

true if the evaluated GridLength is the special "" (star sizing) value; otherwise, **false*.

Attributes

See Also