GridLength Constructors
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the GridLength structure.
GridLength(Double) |
Initializes a new instance of the GridLength structure using the specified absolute value in pixels. |
GridLength(Double, GridUnitType) |
Initializes a new instance of the GridLength structure and specifies what kind of value it holds. |
Initializes a new instance of the GridLength structure using the specified absolute value in pixels.
public:
GridLength(double pixels);
public GridLength(double pixels);
new System.Windows.GridLength : double -> System.Windows.GridLength
Public Sub New (pixels As Double)
Parameters
- pixels
- Double
The number of device-independent pixels (96 pixels-per-inch).
Exceptions
Pixels
is equal to NegativeInfinity, PositiveInfinity, or NaN.
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Initializes a new instance of the GridLength structure and specifies what kind of value it holds.
public:
GridLength(double value, System::Windows::GridUnitType type);
public GridLength(double value, System.Windows.GridUnitType type);
new System.Windows.GridLength : double * System.Windows.GridUnitType -> System.Windows.GridLength
Public Sub New (value As Double, type As GridUnitType)
Parameters
- value
- Double
The initial value of this instance of GridLength.
- type
- GridUnitType
The GridUnitType held by this instance of GridLength.
Exceptions
value
is equal to NegativeInfinity, PositiveInfinity, or NaN.
See also
Applies to
.NET Framework 4.8.1 and other versions
Product | Versions |
---|---|
.NET Framework | 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: