Constructor GridLength
GridLength(double)
Constructor, initializes the GridLength as absolute value in pixels.
public GridLength(double pixels)
Parameters
pixels
doubleSpecifies the number of 'device-independent pixels' (96 pixels-per-inch).
Exceptions
- ArgumentException
If
pixels
parameter isdouble.NaN
orpixels
parameter isdouble.NegativeInfinity
orpixels
parameter isdouble.PositiveInfinity
.
GridLength(double, GridUnitType)
Constructor, initializes the GridLength and specifies what kind of value it will hold.
public GridLength(double value = 0, GridUnitType type = GridUnitType.Auto)
Parameters
value
doubleValue to be stored by this GridLength instance.
type
GridUnitTypeType of the value to be stored by this GridLength instance.
Remarks
If the type
parameter is GridUnitType.Auto
,
then passed in value is ignored and replaced with 0
.
Exceptions
- ArgumentException
If
value
parameter isdouble.NaN
orvalue
parameter isdouble.NegativeInfinity
orvalue
parameter isdouble.PositiveInfinity
.