語言

DataGridLength 建構函式

定義

初始化 DataGridLength 類別的新執行個體。

多載

名稱 Description
DataGridLength(Double)

初始化一個以像素為單位的絕對值的新類別實例 DataGridLength 。

DataGridLength(Double, DataGridLengthUnitType)

初始化一個以指定值與單位的新類別實例 DataGridLength 。

DataGridLength(Double, DataGridLengthUnitType, Double, Double)

初始化類別的新實例 DataGridLength ,包含指定的值、單位、期望值及顯示值。

DataGridLength(Double)

初始化一個以像素為單位的絕對值的新類別實例 DataGridLength 。

public:
 DataGridLength(double pixels);
public DataGridLength(double pixels);
new System.Windows.Controls.DataGridLength : double -> System.Windows.Controls.DataGridLength
Public Sub New (pixels As Double)

參數

pixels
Double

將長度初始化為的絕對像素值(96 像素每英吋)。

例外狀況

適用於

DataGridLength(Double, DataGridLengthUnitType)

初始化一個以指定值與單位的新類別實例 DataGridLength 。

public:
 DataGridLength(double value, System::Windows::Controls::DataGridLengthUnitType type);
public DataGridLength(double value, System.Windows.Controls.DataGridLengthUnitType type);
new System.Windows.Controls.DataGridLength : double * System.Windows.Controls.DataGridLengthUnitType -> System.Windows.Controls.DataGridLength
Public Sub New (value As Double, type As DataGridLengthUnitType)

參數

value
Double

元素的請求尺寸。

type
DataGridLengthUnitType

用來決定元素大小計算方式的類型。

例外狀況

value 是 NaN、 NegativeInfinity,或 PositiveInfinity。

-或-

type 不是 Auto、 Pixel、 Star、 SizeToCells或 SizeToHeader。

適用於

DataGridLength(Double, DataGridLengthUnitType, Double, Double)

初始化類別的新實例 DataGridLength ,包含指定的值、單位、期望值及顯示值。

public:
 DataGridLength(double value, System::Windows::Controls::DataGridLengthUnitType type, double desiredValue, double displayValue);
public DataGridLength(double value, System.Windows.Controls.DataGridLengthUnitType type, double desiredValue, double displayValue);
new System.Windows.Controls.DataGridLength : double * System.Windows.Controls.DataGridLengthUnitType * double * double -> System.Windows.Controls.DataGridLength
Public Sub New (value As Double, type As DataGridLengthUnitType, desiredValue As Double, displayValue As Double)

參數

value
Double

元素的請求尺寸。

type
DataGridLengthUnitType

用來決定元素大小計算方式的類型。

desiredValue
Double

該元素所需的計算尺寸。

displayValue
Double

元素的分配尺寸。

例外狀況

value 是 NaN、 NegativeInfinity,或 PositiveInfinity。

-或-

type 不是 Auto、 Pixel、 Star、 SizeToCells或 SizeToHeader。

-或-

desiredValue 是 NegativeInfinity 或 PositiveInfinity。

-或-

displayValue 是 NegativeInfinity 或 PositiveInfinity。

適用於