30 instantiations of DataGridLength
PresentationFramework (30)
System\Windows\Automation\Peers\DataGridColumnHeaderItemAutomationPeer.cs (1)
174Column.Width = new DataGridLength(width);
System\Windows\Controls\DataGridCell.cs (2)
966updatedWidth = new DataGridLength(Column.ActualWidth + ColumnWidthStepSize); 970updatedWidth = new DataGridLength(Column.ActualWidth - ColumnWidthStepSize);
System\Windows\Controls\DataGridColumn.cs (5)
271column.SetWidthInternal(new DataGridLength(changedWidth.Value, changedWidth.UnitType, changedWidth.DesiredValue, displayValue)); 405return new DataGridLength( 558SetWidthInternal(new DataGridLength(width.Value, width.UnitType, pixelWidth, displayWidth)); 563SetWidthInternal(new DataGridLength(width.Value, width.UnitType, pixelWidth, width.DisplayValue)); 599SetWidthInternal(new DataGridLength(starValue, width.UnitType, desiredWidth, displayWidth));
System\Windows\Controls\DataGridColumnCollection.cs (14)
1190column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1215changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, minWidth)); 1234changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1258changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, maxWidth)); 1276changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1307changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, minWidth + leftOverSpace)); 1360column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, Math.Min(width.DesiredValue, maxWidth))); 1378changedColumn.SetWidthInternal(new DataGridLength( 1705column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue - columnExcessWidth)); 1790column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue + columnLagWidth)); 1936column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, columnDisplayWidth)); 1940column.SetWidthInternal(new DataGridLength(columnDisplayWidth, DataGridLengthUnitType.Pixel, columnDisplayWidth, columnDisplayWidth)); 2105column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue + perColumnGiveAwayWidth)); 2369column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue - perColumnTakeAwayWidth));
System\Windows\Controls\DataGridHelper.cs (1)
272column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, desiredWidth, width.DisplayValue));
System\Windows\Controls\DataGridLength.cs (4)
331return new DataGridLength(value); 346private static readonly DataGridLength _auto = new DataGridLength(AutoValue, DataGridLengthUnitType.Auto, 0d, 0d); 347private static readonly DataGridLength _sizeToCells = new DataGridLength(AutoValue, DataGridLengthUnitType.SizeToCells, 0d, 0d); 348private static readonly DataGridLength _sizeToHeader = new DataGridLength(AutoValue, DataGridLengthUnitType.SizeToHeader, 0d, 0d);
System\Windows\Controls\DataGridLengthConverter.cs (3)
97return new DataGridLength(doubleValue, type); 204return new DataGridLength(1.0, (DataGridLengthUnitType)i); 263return new DataGridLength(value, unit);
86 references to DataGridLength
PresentationFramework (86)
System\Windows\Controls\DataGrid.cs (4)
143public DataGridLength ColumnWidth 145get { return (DataGridLength)GetValue(ColumnWidthProperty); } 153DependencyProperty.Register("ColumnWidth", typeof(DataGridLength), typeof(DataGrid), new FrameworkPropertyMetadata(DataGridLength.SizeToHeader));
System\Windows\Controls\DataGridCell.cs (1)
962DataGridLength updatedWidth;
System\Windows\Controls\DataGridCellsPanel.cs (3)
111DataGridLength width = column.Width; 142DataGridLength width = column.Width; 571DataGridLength width = column.Width;
System\Windows\Controls\DataGridColumn.cs (18)
178public DataGridLength Width 180get { return (DataGridLength)GetValue(WidthProperty); } 190typeof(DataGridLength), 192new FrameworkPropertyMetadata(DataGridLength.Auto, new PropertyChangedCallback(OnWidthPropertyChanged), new CoerceValueCallback(OnCoerceWidth))); 200internal void SetWidthInternal(DataGridLength width) 223DataGridLength oldWidth = (DataGridLength)e.OldValue; 224DataGridLength newWidth = (DataGridLength)e.NewValue; 269DataGridLength changedWidth = column.Width; 274dataGrid.InternalColumns.RedistributeColumnWidthsOnWidthChangeOfColumn(column, (DataGridLength)e.OldValue); 390DataGridLength width = (DataGridLength)DataGridHelper.GetCoercedTransferPropertyValue( 489DataGridLength width = column.Width; 514DataGridLength width = Width; 544DataGridLength width = Width; 593DataGridLength width = Width; 1479internal bool CanColumnResize(DataGridLength width)
System\Windows\Controls\DataGridColumnCollection.cs (34)
805DataGridLength width = column.Width; 877DataGridLength width = column.Width; 911DataGridLength width = column.Width; 940DataGridLength width = column.Width; 963DataGridLength width = column.Width; 1004DataGridLength width = column.Width; 1014DataGridLength width = column.Width; 1083DataGridLength width = column.Width; 1161column.Width = DataGridLength.Auto; 1183DataGridLength width = column.Width; 1206DataGridLength width = changedColumn.Width; 1249DataGridLength width = changedColumn.Width; 1284internal void RedistributeColumnWidthsOnWidthChangeOfColumn(DataGridColumn changedColumn, DataGridLength oldWidth) 1291DataGridLength width = changedColumn.Width; 1355DataGridLength width = column.Width; 1370private void RedistributeColumnWidthsOnNonStarWidthChange(DataGridColumn changedColumn, DataGridLength oldWidth) 1372DataGridLength width = changedColumn.Width; 1438DataGridLength width = column.Width; 1466_originalWidthsForResize = new Dictionary<DataGridColumn, DataGridLength>(); 1497DataGridLength resizingColumnWidth = resizingColumn.Width; 1609DataGridLength width = column.Width; 1657DataGridLength width = column.Width; 1693DataGridLength width = column.Width; 1778DataGridLength width = column.Width; 1859DataGridLength width = column.Width; 1906DataGridLength width = column.Width; 1926DataGridLength width = column.Width; 1978DataGridLength width = column.Width; 2061DataGridLength width = column.Width; 2097DataGridLength width = column.Width; 2250DataGridLength width = column.Width; 2324DataGridLength width = column.Width; 2361DataGridLength width = column.Width; 2536private Dictionary<DataGridColumn, DataGridLength> _originalWidthsForResize; // Dictionary to hold the original widths of columns for resize operation
System\Windows\Controls\DataGridHelper.cs (3)
246DataGridLength width = column.Width; 251DataGridLength oldWidth = (DataGridLength)e.OldValue;
System\Windows\Controls\DataGridLength.cs (14)
17public struct DataGridLength : IEquatable<DataGridLength> 126public static bool operator ==(DataGridLength gl1, DataGridLength gl2) 141public static bool operator !=(DataGridLength gl1, DataGridLength gl2) 157if (obj is DataGridLength l) 173public bool Equals(DataGridLength other) 298public static DataGridLength Auto 306public static DataGridLength SizeToCells 314public static DataGridLength SizeToHeader 329public static implicit operator DataGridLength(double value) 346private static readonly DataGridLength _auto = new DataGridLength(AutoValue, DataGridLengthUnitType.Auto, 0d, 0d); 347private static readonly DataGridLength _sizeToCells = new DataGridLength(AutoValue, DataGridLengthUnitType.SizeToCells, 0d, 0d); 348private static readonly DataGridLength _sizeToHeader = new DataGridLength(AutoValue, DataGridLengthUnitType.SizeToHeader, 0d, 0d);
System\Windows\Controls\DataGridLengthConverter.cs (6)
131if ((value != null) && (value is DataGridLength)) 133DataGridLength length = (DataGridLength)value; 142ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(DataGridLengthUnitType) }); 157internal static string ConvertToString(DataGridLength length, CultureInfo cultureInfo) 193private static DataGridLength ConvertFromString(string s, CultureInfo cultureInfo)
System\Windows\Controls\Primitives\DataGridColumnHeader.cs (3)
357header.Column.Width = DataGridLength.Auto; 362private DataGridLength ColumnWidth 364get { return Column != null ? Column.Width : DataGridLength.Auto; }