Browse Source

Reset DesiredHeight before during measure

Sets DataGridCells.DesiredHeight to 0
before measuring the individual cells
pull/3842/head
sdoroff 6 years ago
parent
commit
eb8de34334
  1. 3
      src/Avalonia.Controls.DataGrid/Primitives/DataGridCellsPresenter.cs

3
src/Avalonia.Controls.DataGrid/Primitives/DataGridCellsPresenter.cs

@ -269,6 +269,9 @@ namespace Avalonia.Controls.Primitives
// Since we didn't know the final widths of the columns until we resized,
// we waited until now to measure each cell
double leftEdge = 0;
if (autoSizeHeight)
DesiredHeight = 0;
foreach (DataGridColumn column in OwningGrid.ColumnsInternal.GetVisibleColumns())
{
DataGridCell cell = OwningRow.Cells[column.Index];

Loading…
Cancel
Save