Giter Club home page Giter Club logo

Comments (2)

jaosnz-rep avatar jaosnz-rep commented on May 28, 2024

Can repro this issue at iOS platform on the latest 17.10 Preview 5 (8.0.21&8.0.14).
image

from maui.

wrexbe avatar wrexbe commented on May 28, 2024

Simpler reproduction

public class MenuPage : ContentPage
{
    private int _counter;

    public MenuPage()
    {
        Title = "Menu";
        On<Microsoft.Maui.Controls.PlatformConfiguration.iOS>().SetUseSafeArea(true);
    }

    protected override void OnSizeAllocated(double width, double height)
    {
        Debug.WriteLine($"****** Width = {width} Height = {height} Counter = {++_counter} ***********");
        Content = new Border { WidthRequest = 100, HeightRequest = 100 };
    }
}

I think it happens like this

  1. Setting SetUseSafeArea to true, registers something that is watching MenuPage for changes, and when it sees a change it tries to update the menu page using something called CrossPlatformArrange.
  2. The Flyout page is not using the same size the CrossPlatformArrange is trying to make the Menu Page.
  3. When the Content is set, Flyout rechecks the menu page, and notices the change, and tries to set it.
  4. The thing that is listening because of the SetUseSafeArea, notices, and tries to change it back again as well.
  5. They keep doing this forever, both trying to set it to different sizes, and the loop never ends.

from maui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.