GridLength 建構函式

定義

多載

GridLength(Double)

使用指定的絕對值 (以像素為單位),初始化 GridLength 結構的新執行個體。

GridLength(Double, GridUnitType)

初始化 GridLength 結構的新執行個體,並指定要包含何種值。

備註

此結構代表 Windows 執行階段 (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

適用於