42 references to DataGridLengthUnitType
PresentationFramework (42)
src\Framework\System\Windows\Controls\DataGridColumn.cs (5)
370
private static double CoerceDesiredOrDisplayWidthValue(double widthValue, double memberValue,
DataGridLengthUnitType
type)
374
if (type ==
DataGridLengthUnitType
.Pixel)
378
else if (type ==
DataGridLengthUnitType
.Auto ||
379
type ==
DataGridLengthUnitType
.SizeToCells ||
380
type ==
DataGridLengthUnitType
.SizeToHeader)
src\Framework\System\Windows\Controls\DataGridColumnCollection.cs (1)
1949
column.SetWidthInternal(new DataGridLength(columnDisplayWidth,
DataGridLengthUnitType
.Pixel, columnDisplayWidth, columnDisplayWidth));
src\Framework\System\Windows\Controls\DataGridLength.cs (22)
37
: this(pixels,
DataGridLengthUnitType
.Pixel)
56
public DataGridLength(double value,
DataGridLengthUnitType
type)
57
: this(value, type, (type ==
DataGridLengthUnitType
.Pixel ? value : Double.NaN), (type ==
DataGridLengthUnitType
.Pixel ? value : Double.NaN))
78
public DataGridLength(double value,
DataGridLengthUnitType
type, double desiredValue, double displayValue)
87
if (type !=
DataGridLengthUnitType
.Auto &&
88
type !=
DataGridLengthUnitType
.Pixel &&
89
type !=
DataGridLengthUnitType
.Star &&
90
type !=
DataGridLengthUnitType
.SizeToCells &&
91
type !=
DataGridLengthUnitType
.SizeToHeader)
112
_unitValue = (type ==
DataGridLengthUnitType
.Auto) ? AutoValue : value;
200
return _unitType ==
DataGridLengthUnitType
.Pixel;
212
return _unitType ==
DataGridLengthUnitType
.Auto;
224
return _unitType ==
DataGridLengthUnitType
.Star;
233
get { return _unitType ==
DataGridLengthUnitType
.SizeToCells; }
241
get { return _unitType ==
DataGridLengthUnitType
.SizeToHeader; }
251
return (_unitType ==
DataGridLengthUnitType
.Auto) ? AutoValue : _unitValue;
258
public
DataGridLengthUnitType
UnitType
344
private
DataGridLengthUnitType
_unitType; // unit type storage
351
private static readonly DataGridLength _auto = new DataGridLength(AutoValue,
DataGridLengthUnitType
.Auto, 0d, 0d);
352
private static readonly DataGridLength _sizeToCells = new DataGridLength(AutoValue,
DataGridLengthUnitType
.SizeToCells, 0d, 0d);
353
private static readonly DataGridLength _sizeToHeader = new DataGridLength(AutoValue,
DataGridLengthUnitType
.SizeToHeader, 0d, 0d);
src\Framework\System\Windows\Controls\DataGridLengthConverter.cs (14)
86
DataGridLengthUnitType
type;
93
type =
DataGridLengthUnitType
.Auto;
97
type =
DataGridLengthUnitType
.Pixel;
155
ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(
DataGridLengthUnitType
) });
174
case
DataGridLengthUnitType
.Auto:
175
case
DataGridLengthUnitType
.SizeToCells:
176
case
DataGridLengthUnitType
.SizeToHeader:
180
case
DataGridLengthUnitType
.Star:
217
return new DataGridLength(1.0, (
DataGridLengthUnitType
)i);
222
DataGridLengthUnitType
unit =
DataGridLengthUnitType
.Pixel;
238
unit = (
DataGridLengthUnitType
)i;
266
if (unit ==
DataGridLengthUnitType
.Star)
276
(unit ==
DataGridLengthUnitType
.Pixel) || DoubleUtil.AreClose(unitFactor, 1.0),