Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
Copy link
Preview

Copilot AI Jul 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Using 'is false' pattern is less readable than the negation operator. Consider using '!double.IsInfinity(parentMeasure.U)' for better readability and consistency with common C# practices.

Suggested change
if (isLast && double.IsInfinity(parentMeasure.U) is false)
if (isLast && !double.IsInfinity(parentMeasure.U))

Copilot uses AI. Check for mistakes.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, I accidentally hit this button... interesting.

{
desiredMeasure.U = parentMeasure.U - position.U;
}
Expand Down
Loading