30 instantiations of DataGridLength
PresentationFramework (30)
System\Windows\Automation\Peers\DataGridColumnHeaderItemAutomationPeer.cs (1)
180Column.Width = new DataGridLength(width);
System\Windows\Controls\DataGridCell.cs (2)
984updatedWidth = new DataGridLength(Column.ActualWidth + ColumnWidthStepSize); 988updatedWidth = new DataGridLength(Column.ActualWidth - ColumnWidthStepSize);
System\Windows\Controls\DataGridColumn.cs (5)
274column.SetWidthInternal(new DataGridLength(changedWidth.Value, changedWidth.UnitType, changedWidth.DesiredValue, displayValue)); 408return new DataGridLength( 561SetWidthInternal(new DataGridLength(width.Value, width.UnitType, pixelWidth, displayWidth)); 566SetWidthInternal(new DataGridLength(width.Value, width.UnitType, pixelWidth, width.DisplayValue)); 602SetWidthInternal(new DataGridLength(starValue, width.UnitType, desiredWidth, displayWidth));
System\Windows\Controls\DataGridColumnCollection.cs (14)
1197column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1222changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, minWidth)); 1241changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1265changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, maxWidth)); 1283changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, displayValue)); 1314changedColumn.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, minWidth + leftOverSpace)); 1367column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, Math.Min(width.DesiredValue, maxWidth))); 1385changedColumn.SetWidthInternal(new DataGridLength( 1712column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue - columnExcessWidth)); 1797column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue + columnLagWidth)); 1943column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, columnDisplayWidth)); 1947column.SetWidthInternal(new DataGridLength(columnDisplayWidth, DataGridLengthUnitType.Pixel, columnDisplayWidth, columnDisplayWidth)); 2112column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue + perColumnGiveAwayWidth)); 2376column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, width.DesiredValue, width.DisplayValue - perColumnTakeAwayWidth));
System\Windows\Controls\DataGridHelper.cs (1)
278column.SetWidthInternal(new DataGridLength(width.Value, width.UnitType, desiredWidth, width.DisplayValue));
System\Windows\Controls\DataGridLength.cs (4)
335return new DataGridLength(value); 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 (3)
101return new DataGridLength(doubleValue, type); 208return new DataGridLength(1.0, (DataGridLengthUnitType)i); 267return new DataGridLength(value, unit);
88 references to DataGridLength
PresentationFramework (88)
System\Windows\Controls\DataGrid.cs (4)
146public DataGridLength ColumnWidth 148get { return (DataGridLength)GetValue(ColumnWidthProperty); } 156DependencyProperty.Register("ColumnWidth", typeof(DataGridLength), typeof(DataGrid), new FrameworkPropertyMetadata(DataGridLength.SizeToHeader));
System\Windows\Controls\DataGridCell.cs (1)
980DataGridLength updatedWidth;
System\Windows\Controls\DataGridCellsPanel.cs (3)
116DataGridLength width = column.Width; 147DataGridLength width = column.Width; 576DataGridLength width = column.Width;
System\Windows\Controls\DataGridColumn.cs (18)
181public DataGridLength Width 183get { return (DataGridLength)GetValue(WidthProperty); } 193typeof(DataGridLength), 195new FrameworkPropertyMetadata(DataGridLength.Auto, new PropertyChangedCallback(OnWidthPropertyChanged), new CoerceValueCallback(OnCoerceWidth))); 203internal void SetWidthInternal(DataGridLength width) 226DataGridLength oldWidth = (DataGridLength)e.OldValue; 227DataGridLength newWidth = (DataGridLength)e.NewValue; 272DataGridLength changedWidth = column.Width; 277dataGrid.InternalColumns.RedistributeColumnWidthsOnWidthChangeOfColumn(column, (DataGridLength)e.OldValue); 393DataGridLength width = (DataGridLength)DataGridHelper.GetCoercedTransferPropertyValue( 492DataGridLength width = column.Width; 517DataGridLength width = Width; 547DataGridLength width = Width; 596DataGridLength width = Width; 1489internal bool CanColumnResize(DataGridLength width)
System\Windows\Controls\DataGridColumnCollection.cs (34)
809DataGridLength width = column.Width; 881DataGridLength width = column.Width; 915DataGridLength width = column.Width; 944DataGridLength width = column.Width; 967DataGridLength width = column.Width; 1008DataGridLength width = column.Width; 1018DataGridLength width = column.Width; 1090DataGridLength width = column.Width; 1168column.Width = DataGridLength.Auto; 1190DataGridLength width = column.Width; 1213DataGridLength width = changedColumn.Width; 1256DataGridLength width = changedColumn.Width; 1291internal void RedistributeColumnWidthsOnWidthChangeOfColumn(DataGridColumn changedColumn, DataGridLength oldWidth) 1298DataGridLength width = changedColumn.Width; 1362DataGridLength width = column.Width; 1377private void RedistributeColumnWidthsOnNonStarWidthChange(DataGridColumn changedColumn, DataGridLength oldWidth) 1379DataGridLength width = changedColumn.Width; 1445DataGridLength width = column.Width; 1473_originalWidthsForResize = new Dictionary<DataGridColumn, DataGridLength>(); 1504DataGridLength resizingColumnWidth = resizingColumn.Width; 1616DataGridLength width = column.Width; 1664DataGridLength width = column.Width; 1700DataGridLength width = column.Width; 1785DataGridLength width = column.Width; 1866DataGridLength width = column.Width; 1913DataGridLength width = column.Width; 1933DataGridLength width = column.Width; 1985DataGridLength width = column.Width; 2068DataGridLength width = column.Width; 2104DataGridLength width = column.Width; 2257DataGridLength width = column.Width; 2331DataGridLength width = column.Width; 2368DataGridLength width = column.Width; 2543private Dictionary<DataGridColumn, DataGridLength> _originalWidthsForResize; // Dictionary to hold the original widths of columns for resize operation
System\Windows\Controls\DataGridHelper.cs (3)
252DataGridLength width = column.Width; 257DataGridLength oldWidth = (DataGridLength)e.OldValue;
System\Windows\Controls\DataGridLength.cs (16)
20public struct DataGridLength : IEquatable<DataGridLength> 129public static bool operator ==(DataGridLength gl1, DataGridLength gl2) 144public static bool operator !=(DataGridLength gl1, DataGridLength gl2) 160if (obj is DataGridLength) 162DataGridLength l = (DataGridLength)obj; 177public bool Equals(DataGridLength other) 302public static DataGridLength Auto 310public static DataGridLength SizeToCells 318public static DataGridLength SizeToHeader 333public static implicit operator DataGridLength(double value) 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 (6)
135if ((value != null) && (value is DataGridLength)) 137DataGridLength length = (DataGridLength)value; 146ConstructorInfo ci = typeof(DataGridLength).GetConstructor(new Type[] { typeof(double), typeof(DataGridLengthUnitType) }); 161internal static string ConvertToString(DataGridLength length, CultureInfo cultureInfo) 197private static DataGridLength ConvertFromString(string s, CultureInfo cultureInfo)
System\Windows\Controls\Primitives\DataGridColumnHeader.cs (3)
371header.Column.Width = DataGridLength.Auto; 376private DataGridLength ColumnWidth 378get { return Column != null ? Column.Width : DataGridLength.Auto; }