Skip to content

Commit 53b886a

Browse files
Poker-sangArlodotexe
authored andcommitted
Update DockPanel.cs
1 parent dbbddc9 commit 53b886a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/Primitives/src/DockPanel/DockPanel.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ protected override Size ArrangeOverride(Size finalSize)
8282
}
8383
}
8484

85-
if (LastChildFill)
85+
if (LastChildFill && Children.Count > 0)
8686
{
8787
var child = Children[Children.Count - 1];
8888
child.Arrange(new Rect(currentBounds.X, currentBounds.Y, currentBounds.Width, currentBounds.Height));
@@ -141,7 +141,7 @@ protected override Size MeasureOverride(Size availableSize)
141141
}
142142
}
143143

144-
if (LastChildFill)
144+
if (LastChildFill && Children.Count > 0)
145145
{
146146
var child = Children[Children.Count - 1];
147147
var childConstraint = new Size(

0 commit comments

Comments
 (0)