Skip to content

FlexLayout Wrap Misalignment with Dynamically-Sized Buttons in .NET MAUIΒ #30957

Description

Description

In .NET MAUI, when using a FlexLayout with Wrap="true" and placing Button controls within it, the layout does not consistently wrap elements as expected. Under certain conditionsβ€”such as runtime property changes that subtly affect the button sizeβ€”the layout places buttons unevenly, stacking one on top of the other rather than continuing horizontally.

FrameworkIssue.mp4

A reproducible scenario involves modifying the FontFamily of buttons dynamically, which leads to subtle dimension shifts. These micro-adjustments disrupt the wrap logic, causing buttons to stack vertically in an unintended one-above-another fashion, despite sufficient horizontal space.

This issue highlights a sensitivity in FlexLayout’s wrap calculation algorithm when handling controls that experience dynamic resizing during runtime.

Steps to Reproduce

FlexLayoutSample.zip

  1. Create a new .NET MAUI app.
  2. In the MainPage.xaml, add a FlexLayout with Wrap="true" and horizontal.
  3. Add multiple Button controls inside the FlexLayout, and bind their FontFamily and Text to a toggleable state.
  4. Run the app and click the buttons repeatedly.
  5. Observe the layout: As font toggles and button sizes change subtly, the FlexLayout may stack buttons vertically instead of wrapping properlyβ€”even when horizontal space is available.

Link to public reproduction project repository

No response

Version with bug

10.0.0-preview.6

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

I was not able test on other platforms

Affected platform versions

Windows

Did you find any workaround?

No response

Relevant log output

Activity

  1. ghost added
    t/bugSomething isn't working
    on Jul 31, 2025
  2. ghost added
    area-layoutStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
    on Jul 31, 2025
  3. ghost added
    s/verifiedVerified / Reproducible Issue ready for Engineering Triage
    on Jul 31, 2025
  4. ghost added
    s/triagedIssue has been reviewed
    on Jul 31, 2025
  5. ghost added on Jul 31, 2025
  6. added this to the Backlog milestone on Aug 1, 2025
  7. ghost added
    partner/syncfusionIssues / PR's with Syncfusion collaboration
    on Aug 26, 2025
  8. DavidIDCI commented on Oct 6, 2025

    @DavidIDCI

    I was able to reproduce this issue on an Android device by using the provided sample and selecting the center of the three buttons.

    This is not a Windows-only issue.

    30957-android.mp4
  9. added a commit that references this issue on Jul 6, 2026
  10. locked and limited conversation to collaborators on Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-layoutStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterlayout-flexFlexLayout issuespartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions