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

用于确定如何计算元素大小的类型。

例外

适用于

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

适用于