We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 55e35e6 commit 0836390Copy full SHA for 0836390
src/Shared/HandyControl_Shared/Controls/Panel/Grid/Row.cs
@@ -1,4 +1,5 @@
1
-using System.Linq;
+using System;
2
+using System.Linq;
3
using System.Windows;
4
using System.Windows.Controls;
5
using HandyControl.Data;
@@ -67,6 +68,8 @@ protected override Size ArrangeOverride(Size finalSize)
67
68
var totalCellCount = 0;
69
var gutterHalf = Gutter / 2;
70
var itemWidth = (finalSize.Width - _totalAutoWidth + Gutter) / ColLayout.ColMaxCellCount;
71
+ itemWidth = Math.Max(0, itemWidth);
72
+
73
var childBounds = new Rect(-gutterHalf, -gutterHalf, 0, _maxChildDesiredHeight);
74
_layoutStatus = ColLayout.GetLayoutStatus(finalSize.Width);
75
0 commit comments