-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fixed the FlexLayout reverse issue with the AlignContent #32134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Hey there @@Ahamed-Ali! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a FlexLayout positioning bug where children were incorrectly positioned when using Wrap = Reverse combined with AlignContent set to SpaceAround, SpaceBetween, or SpaceEvenly. The fix reorders the reverse layout calculations to occur after child positioning rather than before.
Key Changes:
- Moved the
layout.reverse2block inFlex.csto execute after child positioning instead of before - Added comprehensive UI tests covering all three affected
AlignContentvalues
Reviewed Changes
Copilot reviewed 3 out of 15 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/Core/src/Layouts/Flex.cs |
Moved reverse layout calculation block after child positioning to use correct reference points |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31565.cs |
Added NUnit tests for SpaceAround, SpaceBetween, and SpaceEvenly scenarios |
src/Controls/tests/TestCases.HostApp/Issues/Issue31565.cs |
Added interactive test page demonstrating the FlexLayout reverse alignment fix |
|
/azp run |
|
Azure Pipelines successfully started running 3 pipeline(s). |

Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Root Cause of the issue
Description of Change
Issues Fixed
Fixes #31565
Tested the behaviour in the following platforms
Screenshot
FlexLayoutissue.mov
FlexLayoutFix.mov