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