DataGridLength 建構函式

定義

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

多載

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

用於決定項目大小計算方式的型別。

例外狀況

valueNaNNegativeInfinityPositiveInfinity

-或-

type 不是 AutoPixelStarSizeToCellsSizeToHeader

適用於

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

項目的配置大小。

例外狀況

valueNaNNegativeInfinityPositiveInfinity

-或-

type 不是 AutoPixelStarSizeToCellsSizeToHeader

-或-

desiredValueNegativeInfinityPositiveInfinity

-或-

displayValueNegativeInfinityPositiveInfinity

適用於