42 references to DataGridLengthUnitType
PresentationFramework (42)
System\Windows\Controls\DataGridColumn.cs (5)
369
private static double CoerceDesiredOrDisplayWidthValue(double widthValue, double memberValue,
DataGridLengthUnitType
type)
373
if (type ==
DataGridLengthUnitType
.Pixel)
377
else if (type ==
DataGridLengthUnitType
.Auto ||
378
type ==
DataGridLengthUnitType
.SizeToCells ||
379
type ==
DataGridLengthUnitType
.SizeToHeader)
System\Windows\Controls\DataGridColumnCollection.cs (1)
1948
column.SetWidthInternal(new DataGridLength(columnDisplayWidth,
DataGridLengthUnitType
.Pixel, columnDisplayWidth, columnDisplayWidth));
System\Windows\Controls\DataGridLength.cs (22)
36
: this(pixels,
DataGridLengthUnitType
.Pixel)
55
public DataGridLength(double value,
DataGridLengthUnitType
type)
56
: this(value, type, (type ==
DataGridLengthUnitType
.Pixel ? value : Double.NaN), (type ==
DataGridLengthUnitType
.Pixel ? value : Double.NaN))
77
public DataGridLength(double value,
DataGridLengthUnitType
type, double desiredValue, double displayValue)
86
if (type !=
DataGridLengthUnitType
.Auto &&
87
type !=
DataGridLengthUnitType
.Pixel &&
88
type !=
DataGridLengthUnitType
.Star &&
89
type !=
DataGridLengthUnitType
.SizeToCells &&
90
type !=
DataGridLengthUnitType
.SizeToHeader)
111
_unitValue = (type ==
DataGridLengthUnitType
.Auto) ? AutoValue : value;
199
return _unitType ==
DataGridLengthUnitType
.Pixel;
211
return _unitType ==
DataGridLengthUnitType
.Auto;
223
return _unitType ==
DataGridLengthUnitType
.Star;
232
get { return _unitType ==
DataGridLengthUnitType
.SizeToCells; }
240
get { return _unitType ==
DataGridLengthUnitType
.SizeToHeader; }
250
return (_unitType ==
DataGridLengthUnitType
.Auto) ? AutoValue : _unitValue;
257
public
DataGridLengthUnitType
UnitType
343
private
DataGridLengthUnitType
_unitType; // unit type storage
350
private static readonly DataGridLength _auto = new DataGridLength(AutoValue,
DataGridLengthUnitType
.Auto, 0d, 0d);
351
private static readonly DataGridLength _sizeToCells = new DataGridLength(AutoValue,
DataGridLengthUnitType
.SizeToCells, 0d, 0d);
352
private static readonly DataGridLength _sizeToHeader = new DataGridLength(AutoValue,
DataGridLengthUnitType
.SizeToHeader, 0d, 0d);
System\Windows\Controls\DataGridLengthConverter.cs (14)
85
DataGridLengthUnitType
type;
92
type =
DataGridLengthUnitType
.Auto;
96
type =
DataGridLengthUnitType
.Pixel;
146
ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(
DataGridLengthUnitType
) });
165
case
DataGridLengthUnitType
.Auto:
166
case
DataGridLengthUnitType
.SizeToCells:
167
case
DataGridLengthUnitType
.SizeToHeader:
171
case
DataGridLengthUnitType
.Star:
208
return new DataGridLength(1.0, (
DataGridLengthUnitType
)i);
213
DataGridLengthUnitType
unit =
DataGridLengthUnitType
.Pixel;
229
unit = (
DataGridLengthUnitType
)i;
257
if (unit ==
DataGridLengthUnitType
.Star)
267
(unit ==
DataGridLengthUnitType
.Pixel) || DoubleUtil.AreClose(unitFactor, 1.0),