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