From a4cb49fa51c3a20406f71ab1490a1a3eecc769f9 Mon Sep 17 00:00:00 2001 From: walterlv Date: Fri, 4 May 2018 19:04:49 +0800 Subject: [PATCH] Fix the column/row span layout. --- src/Avalonia.Controls/Utils/GridLayout.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Avalonia.Controls/Utils/GridLayout.cs b/src/Avalonia.Controls/Utils/GridLayout.cs index cfbe81ba87..dd260f31df 100644 --- a/src/Avalonia.Controls/Utils/GridLayout.cs +++ b/src/Avalonia.Controls/Utils/GridLayout.cs @@ -337,8 +337,8 @@ namespace Avalonia.Controls.Utils var more = 0.0; foreach (var additional in _additionalConventions) { - // If the additional conventions contains the Auto column/row, try to determine the Auto column/row length. - if (additional.Index <= index && index < additional.Index + additional.Span) + // If the additional convention's last column/row contains the Auto column/row, try to determine the Auto column/row length. + if (index == additional.Index + additional.Span - 1) { var min = Enumerable.Range(additional.Index, additional.Span) .Select(x =>