-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Layout Cycle Detected when a Flexlayout is inside a StackLayout on Windows #11909
Description
Description
Having a FlexLayout inside a StackLayout is causing Visual Studio to detect a " Layout Cycle " and throw an exception.
The issue appears only when running on Windows. On iOS/Android/MacCatalyst it just loads an empty page.
To reproduce the issue run the attached reproducible project or simply paste this code in a page (Targeting Windows):
<ContentPage.Content>
<StackLayout>
<FlexLayout>
<Label Text="ok" />
</FlexLayout>
</StackLayout>
</ContentPage.Content>
This is the error on Visual Studio:
The error messages I got are two:
-
A Cycle occurred while laying out the GUI
Layout cycle detected. Layout could not complete -
Element not found
This issue might be related with #9905
Steps to Reproduce
Run the attached reproducible project and click on the "CLICK HERE ... " button
Link to public reproduction project repository
https://github.com/YiannisBourkelis/maui_issues/tree/main/src/LayoutCycleFlexLayoutIssue
Version with bug
7.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
Windows 10
Did you find any workaround?
No
Relevant log output
No response