DataGridLength 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化 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 像素)。
例外
pixels 是 NaN, NegativeInfinity或 PositiveInfinity。
适用于
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
元素的请求大小。
用于确定如何计算元素大小的类型。
例外
value 是 NaN, NegativeInfinity或 PositiveInfinity。
-或-
type不是、、、或AutoPixel。 StarSizeToCellsSizeToHeader
适用于
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
元素的请求大小。
用于确定如何计算元素大小的类型。
- desiredValue
- Double
元素所需的计算大小。
- displayValue
- Double
元素的分配大小。
例外
value 是 NaN, NegativeInfinity或 PositiveInfinity。
-或-
type不是、、、或AutoPixel。 StarSizeToCellsSizeToHeader
-或-
desiredValue 是 NegativeInfinity 或 PositiveInfinity。
-或-
displayValue 是 NegativeInfinity 或 PositiveInfinity。