30 instantiations of DataGridLength
PresentationFramework (30)
System\Windows\Automation\Peers\DataGridColumnHeaderItemAutomationPeer.cs (1)
173Column.Width = new DataGridLength(width);
System\Windows\Controls\DataGridCell.cs (2)
965updatedWidth = new DataGridLength(Column.ActualWidth + ColumnWidthStepSize); 969updatedWidth = new DataGridLength(Column.ActualWidth - ColumnWidthStepSize);
System\Windows\Controls\DataGridColumn.cs (5)
270column.SetWidthInternal(new DataGridLength(changedWidth.Value, changedWidth.UnitType, changedWidth.DesiredValue, displayValue)); 404return new DataGridLength( 557SetWidthInternal(new DataGridLength(width.Value, width.UnitType, pixelWidth, displayWidth)); 562SetWidthInternal(new DataGridLength(width.Value, width.UnitType, pixelWidth, width.DisplayValue)); 598SetWidthInternal(new DataGridLength(starValue, width.UnitType, desiredWidth, displayWidth));
System\Windows\Controls\DataGridColumnCollection.cs (14)
1189column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1214changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, minWidth)); 1233changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1257changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, maxWidth)); 1275changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1306changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, minWidth + leftOverSpace)); 1359column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, Math.Min(width.DesiredValue, maxWidth))); 1377changedColumn.SetWidthInternal(new DataGridLength( 1704column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue - columnExcessWidth)); 1789column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue + columnLagWidth)); 1935column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, columnDisplayWidth)); 1939column.SetWidthInternal(new DataGridLength(columnDisplayWidth, DataGridLengthUnitType.Pixel, columnDisplayWidth, columnDisplayWidth)); 2104column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue + perColumnGiveAwayWidth)); 2368column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue - perColumnTakeAwayWidth));
System\Windows\Controls\DataGridHelper.cs (1)
271column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, desiredWidth, width.DisplayValue));
System\Windows\Controls\DataGridLength.cs (4)
330return new DataGridLength(value); 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 (3)
96return new DataGridLength(doubleValue, type); 203return new DataGridLength(1.0, (DataGridLengthUnitType)i); 262return new DataGridLength(value, unit);
86 references to DataGridLength
PresentationFramework (86)
System\Windows\Controls\DataGrid.cs (4)
142public DataGridLength ColumnWidth 144get { return (DataGridLength)GetValue(ColumnWidthProperty); } 152DependencyProperty.Register("ColumnWidth", typeof(DataGridLength), typeof(DataGrid), new FrameworkPropertyMetadata(DataGridLength.SizeToHeader));
System\Windows\Controls\DataGridCell.cs (1)
961DataGridLength updatedWidth;
System\Windows\Controls\DataGridCellsPanel.cs (3)
110DataGridLength width = column.Width; 141DataGridLength width = column.Width; 570DataGridLength width = column.Width;
System\Windows\Controls\DataGridColumn.cs (18)
177public DataGridLength Width 179get { return (DataGridLength)GetValue(WidthProperty); } 189typeof(DataGridLength), 191new FrameworkPropertyMetadata(DataGridLength.Auto, new PropertyChangedCallback(OnWidthPropertyChanged), new CoerceValueCallback(OnCoerceWidth))); 199internal void SetWidthInternal(DataGridLength width) 222DataGridLength oldWidth = (DataGridLength)e.OldValue; 223DataGridLength newWidth = (DataGridLength)e.NewValue; 268DataGridLength changedWidth = column.Width; 273dataGrid.InternalColumns.RedistributeColumnWidthsOnWidthChangeOfColumn(column, (DataGridLength)e.OldValue); 389DataGridLength width = (DataGridLength)DataGridHelper.GetCoercedTransferPropertyValue( 488DataGridLength width = column.Width; 513DataGridLength width = Width; 543DataGridLength width = Width; 592DataGridLength width = Width; 1478internal bool CanColumnResize(DataGridLength width)
System\Windows\Controls\DataGridColumnCollection.cs (34)
804DataGridLength width = column.Width; 876DataGridLength width = column.Width; 910DataGridLength width = column.Width; 939DataGridLength width = column.Width; 962DataGridLength width = column.Width; 1003DataGridLength width = column.Width; 1013DataGridLength width = column.Width; 1082DataGridLength width = column.Width; 1160column.Width = DataGridLength.Auto; 1182DataGridLength width = column.Width; 1205DataGridLength width = changedColumn.Width; 1248DataGridLength width = changedColumn.Width; 1283internal void RedistributeColumnWidthsOnWidthChangeOfColumn(DataGridColumn changedColumn, DataGridLength oldWidth) 1290DataGridLength width = changedColumn.Width; 1354DataGridLength width = column.Width; 1369private void RedistributeColumnWidthsOnNonStarWidthChange(DataGridColumn changedColumn, DataGridLength oldWidth) 1371DataGridLength width = changedColumn.Width; 1437DataGridLength width = column.Width; 1465_originalWidthsForResize = new Dictionary<DataGridColumn, DataGridLength>(); 1496DataGridLength resizingColumnWidth = resizingColumn.Width; 1608DataGridLength width = column.Width; 1656DataGridLength width = column.Width; 1692DataGridLength width = column.Width; 1777DataGridLength width = column.Width; 1858DataGridLength width = column.Width; 1905DataGridLength width = column.Width; 1925DataGridLength width = column.Width; 1977DataGridLength width = column.Width; 2060DataGridLength width = column.Width; 2096DataGridLength width = column.Width; 2249DataGridLength width = column.Width; 2323DataGridLength width = column.Width; 2360DataGridLength width = column.Width; 2535private Dictionary<DataGridColumn, DataGridLength> _originalWidthsForResize; // Dictionary to hold the original widths of columns for resize operation
System\Windows\Controls\DataGridHelper.cs (3)
245DataGridLength width = column.Width; 250DataGridLength oldWidth = (DataGridLength)e.OldValue;
System\Windows\Controls\DataGridLength.cs (14)
16public struct DataGridLength : IEquatable<DataGridLength> 125public static bool operator ==(DataGridLength gl1, DataGridLength gl2) 140public static bool operator !=(DataGridLength gl1, DataGridLength gl2) 156if (obj is DataGridLength l) 172public bool Equals(DataGridLength other) 297public static DataGridLength Auto 305public static DataGridLength SizeToCells 313public static DataGridLength SizeToHeader 328public static implicit operator DataGridLength(double value) 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 (6)
130if ((value != null) && (value is DataGridLength)) 132DataGridLength length = (DataGridLength)value; 141ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(DataGridLengthUnitType) }); 156internal static string ConvertToString(DataGridLength length, CultureInfo cultureInfo) 192private static DataGridLength ConvertFromString(string s, CultureInfo cultureInfo)
System\Windows\Controls\Primitives\DataGridColumnHeader.cs (3)
356header.Column.Width = DataGridLength.Auto; 361private DataGridLength ColumnWidth 363get { return Column != null ? Column.Width : DataGridLength.Auto; }