42 references to DataGridLengthUnitType
PresentationFramework (42)
System\Windows\Controls\DataGridColumn.cs (5)
365
private static double CoerceDesiredOrDisplayWidthValue(double widthValue, double memberValue,
DataGridLengthUnitType
type)
369
if (type ==
DataGridLengthUnitType
.Pixel)
373
else if (type ==
DataGridLengthUnitType
.Auto ||
374
type ==
DataGridLengthUnitType
.SizeToCells ||
375
type ==
DataGridLengthUnitType
.SizeToHeader)
System\Windows\Controls\DataGridColumnCollection.cs (1)
1939
column.SetWidthInternal(new DataGridLength(columnDisplayWidth,
DataGridLengthUnitType
.Pixel, columnDisplayWidth, columnDisplayWidth));
System\Windows\Controls\DataGridLength.cs (22)
32
: this(pixels,
DataGridLengthUnitType
.Pixel)
51
public DataGridLength(double value,
DataGridLengthUnitType
type)
52
: this(value, type, (type ==
DataGridLengthUnitType
.Pixel ? value : Double.NaN), (type ==
DataGridLengthUnitType
.Pixel ? value : Double.NaN))
73
public DataGridLength(double value,
DataGridLengthUnitType
type, double desiredValue, double displayValue)
82
if (type !=
DataGridLengthUnitType
.Auto &&
83
type !=
DataGridLengthUnitType
.Pixel &&
84
type !=
DataGridLengthUnitType
.Star &&
85
type !=
DataGridLengthUnitType
.SizeToCells &&
86
type !=
DataGridLengthUnitType
.SizeToHeader)
107
_unitValue = (type ==
DataGridLengthUnitType
.Auto) ? AutoValue : value;
194
return _unitType ==
DataGridLengthUnitType
.Pixel;
206
return _unitType ==
DataGridLengthUnitType
.Auto;
218
return _unitType ==
DataGridLengthUnitType
.Star;
227
get { return _unitType ==
DataGridLengthUnitType
.SizeToCells; }
235
get { return _unitType ==
DataGridLengthUnitType
.SizeToHeader; }
245
return (_unitType ==
DataGridLengthUnitType
.Auto) ? AutoValue : _unitValue;
252
public
DataGridLengthUnitType
UnitType
338
private
DataGridLengthUnitType
_unitType; // unit type storage
345
private static readonly DataGridLength _auto = new DataGridLength(AutoValue,
DataGridLengthUnitType
.Auto, 0d, 0d);
346
private static readonly DataGridLength _sizeToCells = new DataGridLength(AutoValue,
DataGridLengthUnitType
.SizeToCells, 0d, 0d);
347
private static readonly DataGridLength _sizeToHeader = new DataGridLength(AutoValue,
DataGridLengthUnitType
.SizeToHeader, 0d, 0d);
System\Windows\Controls\DataGridLengthConverter.cs (14)
80
DataGridLengthUnitType
type;
87
type =
DataGridLengthUnitType
.Auto;
91
type =
DataGridLengthUnitType
.Pixel;
141
ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(
DataGridLengthUnitType
) });
160
case
DataGridLengthUnitType
.Auto:
161
case
DataGridLengthUnitType
.SizeToCells:
162
case
DataGridLengthUnitType
.SizeToHeader:
166
case
DataGridLengthUnitType
.Star:
203
return new DataGridLength(1.0, (
DataGridLengthUnitType
)i);
208
DataGridLengthUnitType
unit =
DataGridLengthUnitType
.Pixel;
223
unit = (
DataGridLengthUnitType
)i;
245
if (unit ==
DataGridLengthUnitType
.Star)
255
(unit ==
DataGridLengthUnitType
.Pixel) || DoubleUtil.AreClose(unitFactor, 1.0),