Giter Club home page Giter Club logo

Comments (2)

davidortinau avatar davidortinau commented on June 8, 2024 1

This is the designed behavior. VerticalStackLayout doesn't size children, and will take up all the space needed by its children, even going off screen as it does here. Hence there's no constraint. The inner VStack child measures all the labels and says "I need X height" and the ScrollView says to the parent Layout "how much room do I have, should I scroll my children that need X?" and the parent is a VStack that says "I'll give you all the space you need" and so...no scroll. Grid on the other hand (or other column as you have here) gets its height constraint from the parent Grid which got it from the Window, and thus the ScrollView gets a constraint from which to determine it needs to scroll its children.

Grid > VStack > ScrollView > VStack is inefficient and won't get you the results you want.

Grid > Grid > ScrollView > VStack is still inefficient, but get's the desired result. Do something like that. Optimize by collapsing the Grids into one. I realize this is just a sample.

https://learn.microsoft.com/en-us/dotnet/maui/migration/layouts?view=net-maui-8.0#stacklayout

from maui.

vitalbit avatar vitalbit commented on June 8, 2024

Got it, thanks a lot for explanation. Now I know how VerticalStackLayout thinking :)

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.