Skip to content

Commit 63c9eba

Browse files
committed
fix issue
1 parent cf29259 commit 63c9eba

File tree

1 file changed

+7
-0
lines changed
  • Microsoft.Toolkit.Uwp.UI.Controls.Primitives/WrapPanel

1 file changed

+7
-0
lines changed

Microsoft.Toolkit.Uwp.UI.Controls.Primitives/WrapPanel/WrapPanel.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,13 @@ protected override Size ArrangeOverride(Size finalSize)
166166
foreach (var rect in row.ChildrenRects)
167167
{
168168
var child = Children[childIndex++];
169+
while (child.Visibility == Visibility.Collapsed)
170+
{
171+
// Collapsed children are not added into the rows,
172+
// we skip them.
173+
child = Children[childIndex++];
174+
}
175+
169176
var arrangeRect = new UvRect
170177
{
171178
Position = rect.Position,

0 commit comments

Comments
 (0)