Browse Source

Merge branch 'master' into fixes/3843-dialog-window-sizing

pull/3856/head
Dariusz Komosiński 6 years ago
committed by GitHub
parent
commit
13e61dcffc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Controls.DataGrid/DataGridBoundColumn.cs
  2. 3
      src/Avalonia.Controls.DataGrid/Primitives/DataGridCellsPresenter.cs

2
src/Avalonia.Controls.DataGrid/DataGridBoundColumn.cs

@ -55,7 +55,7 @@ namespace Avalonia.Controls
binding.Mode = BindingMode.TwoWay;
}
if (binding.Converter == null)
if (binding.Converter == null && string.IsNullOrEmpty(binding.StringFormat))
{
binding.Converter = DataGridValueConverter.Instance;
}

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