Επεξεργασία

Κοινή χρήση μέσω


DataGridLength Constructors

Definition

Initializes a new instance of the DataGridLength class.

Overloads

DataGridLength(Double)

Initializes a new instance of the DataGridLength class with an absolute value in pixels.

DataGridLength(Double, DataGridLengthUnitType)

Initializes a new instance of the DataGridLength class with a specified value and unit.

DataGridLength(Double, DataGridLengthUnitType, Double, Double)

Initializes a new instance of the DataGridLength class with the specified value, unit, desired value, and display value.

DataGridLength(Double)

Initializes a new instance of the DataGridLength class with an absolute value in pixels.

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

Parameters

pixels
Double

The absolute pixel value (96 pixels-per-inch) to initialize the length to.

Exceptions

Applies to

DataGridLength(Double, DataGridLengthUnitType)

Initializes a new instance of the DataGridLength class with a specified value and unit.

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)

Parameters

value
Double

The requested size of the element.

type
DataGridLengthUnitType

The type that is used to determine how the size of the element is calculated.

Exceptions

Applies to

DataGridLength(Double, DataGridLengthUnitType, Double, Double)

Initializes a new instance of the DataGridLength class with the specified value, unit, desired value, and display value.

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)

Parameters

value
Double

The requested size of the element.

type
DataGridLengthUnitType

The type that is used to determine how the size of the element is calculated.

desiredValue
Double

The calculated size needed for the element.

displayValue
Double

The allocated size for the element.

Exceptions

value is NaN, NegativeInfinity, or PositiveInfinity.

-or-

type is not Auto, Pixel, Star, SizeToCells, or SizeToHeader.

-or-

desiredValue is NegativeInfinity or PositiveInfinity.

-or-

displayValue is NegativeInfinity or PositiveInfinity.

Applies to