What is the best choice for a responsive layout? #25346
-
As I understand it, the 'StackLayout' (HorizontalStackLayout and VerticalStackLayout) in MAUI simply arranges the elements within it to fill the space. So there is no actual 'stacking' that goes on in the sense that if you have a HorizontalStackLayout which has content that does not fit in the screen width, it will not wrap / arrange it's children vertically (like a row/column based responsive layout on the web such as 'Bootstrap'). Is there no equivalent of row/column based responsiveness in MAUI? What would be the best layout option to implement this, or is it simply better not to go with the concept of a responsive wrapping / stacking UI? In my particular use case we are talking about forms, some sections of which would be nice to have arranged horizontally on tablet and desktop sized devices, but on most phones really only fit vertically. I would have thought this should be straightforward but maybe I am missing something. Thanks in advance for any guidance. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Have you tried |
Beta Was this translation helpful? Give feedback.
Something like this? I'm not sure what your
Field
view is or how it is layed out.You could also set
FlexLayout.Basis
,FlexLayout.Shrink
andFlexLayout.Grow
on theVerticalStackLayout
s to change how they'll get sizedThe documentation is well worth a read.