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