Share via


GridLengthHelper.FromValueAndType(Double, GridUnitType) Method

Definition

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

public:
 static GridLength FromValueAndType(double value, GridUnitType type);
 static GridLength FromValueAndType(double const& value, GridUnitType const& type);
public static GridLength FromValueAndType(double value, GridUnitType type);
function fromValueAndType(value, type)
Public Shared Function FromValueAndType (value As Double, type As GridUnitType) As GridLength

Parameters

value
Double

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

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

Returns

The created GridLength.

Applies to