Skip to content
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

AbsoluteLayout with SizeProportional not working #22195

Open
JavierFajardoSecanda opened this issue May 3, 2024 · 3 comments
Open

AbsoluteLayout with SizeProportional not working #22195

JavierFajardoSecanda opened this issue May 3, 2024 · 3 comments
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-absolute platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@JavierFajardoSecanda
Copy link

Description

When I use the AbsoluteLayout component and define the LayoutFlags property as SizeProportional, my application crashes.

This is the error message:
Message = "Layout cycle detected. Layout could not complete."

The application works if I add to the AbsoluteLayout component the property MaximumHeightRequest.
But, I don't know why I have to add this property and why it's not working without this.

Steps to Reproduce

  1. Create a new MAUI project.
  2. Create one view (MainPage) and a view model (MainPageViewModel)
  3. Adding an AbsoluteLayout component to the MainPage view
  4. Launch the application and check it's not working and we can see the error with the message: "Layout cycle detected. Layout could not complete."
  5. Add the MaximumHeightRequest property to the AbsoluteLayout component (For instance: MaximumHeightRequest="1000")
  6. Launch the application again and check it's now working

Link to public reproduction project repository

https://github.com/JavierFajardoSecanda/AbsoluteLayoutMauiTest

Version with bug

8.0.21 SR4.1

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows

Did you find any workaround?

The application works if I add to the AbsoluteLayout component the property MaximumHeightRequest.

Relevant log output

No response

@JavierFajardoSecanda JavierFajardoSecanda added the t/bug Something isn't working label May 3, 2024
Copy link
Contributor

github-actions bot commented May 3, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jsuarezruiz jsuarezruiz added area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-absolute labels May 3, 2024
@RoiChen001 RoiChen001 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels May 6, 2024
@RoiChen001
Copy link
Collaborator

Can repro this issue at Windows platform on the latest 17.10 Preview 6(8.0.20&8.0.21).

@PureWeen PureWeen added this to the Backlog milestone May 7, 2024
@bugtesterdani
Copy link

Can also confirm, that it also happens with a StackLayout at refreshing by ViewModel

I found my bug, when trying in Debug running, and the App Started on my first Desktop. Then i switch it to a bigger Screen (other Desktop). After switching i reloaded from ViewModel by OnPropertyChanged Trigger and it crashed to App.g.i.cs UnhandledException: "Layout cycle detected. Layout could not complete."

@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-absolute platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants