GridLength 构造函数

定义

重载

GridLength(Double)

使用指定的绝对值(以像素为单位)初始化 GridLength 结构的新实例。

GridLength(Double, GridUnitType)

初始化 GridLength 结构的新实例并指定它包含何种类型的值。

注解

此结构表示 Windows Runtime (WinRT) 的 .NET GridLength 投影。 有关详细信息,请参阅 UWP API参考中的 GridLength。

GridLength(Double)

使用指定的绝对值(以像素为单位)初始化 GridLength 结构的新实例。

public:
 GridLength(double pixels);
public GridLength (double pixels);
new Windows.UI.Xaml.GridLength : double -> Windows.UI.Xaml.GridLength
Public Sub New (pixels As Double)

参数

pixels
Double

要作为值建立的绝对像素计数。

适用于

GridLength(Double, GridUnitType)

初始化 GridLength 结构的新实例并指定它包含何种类型的值。

public:
 GridLength(double value, Windows::UI::Xaml::GridUnitType type);
public GridLength (double value, Windows.UI.Xaml.GridUnitType type);
new Windows.UI.Xaml.GridLength : double * Windows.UI.Xaml.GridUnitType -> Windows.UI.Xaml.GridLength
Public Sub New (value As Double, type As GridUnitType)

参数

value
Double

GridLength 实例的初始值。

type
GridUnitType

GridUnitType 实例包含 GridLength

例外

value 小于 0 或者不是数字。

  • 或 -

type 不是有效的 GridUnitType

适用于