Skip to content
3 changes: 2 additions & 1 deletion components/Primitives/src/WrapPanel/WrapPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ void Arrange(UIElement child, bool isLast = false)
}

// Stretch the last item to fill the available space
if (isLast)
// if the parent measure is not infinite
if (isLast && double.IsInfinity(parentMeasure.U) is false)
{
desiredMeasure.U = parentMeasure.U - position.U;
}
Expand Down
Loading