You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to make MAUI app with image gallery layout page design, like that:
Requirement would be to use GridItemsLayout with Span which automatically makes preferred column count and each grid cell should have same width and height.
To achieve that I'm using: <Border HeightRequest="{Binding Width, Source={RelativeSource Self}}">
Otherwise GridItemsLayout calculate cell height to zero and cells are not visible, or shrinks to minimum defined cell height, e.g:
Using this binding is inefficient and when scrolling you can feel some lag. Is there any way to achieve this requirement without binding value? Maybe overriding CollectionViewHandler you can set somewhere for each computed grid cell height to computed width? Anybody faced similar situation/optimization?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I would like to make MAUI app with image gallery layout page design, like that:
Requirement would be to use
GridItemsLayout
withSpan
which automatically makes preferred column count and each grid cell should have same width and height.To achieve that I'm using:
<Border HeightRequest="{Binding Width, Source={RelativeSource Self}}">
Otherwise
GridItemsLayout
calculate cell height to zero and cells are not visible, or shrinks to minimum defined cell height, e.g:Using this binding is inefficient and when scrolling you can feel some lag. Is there any way to achieve this requirement without binding value? Maybe overriding CollectionViewHandler you can set somewhere for each computed grid cell height to computed width? Anybody faced similar situation/optimization?
Beta Was this translation helpful? Give feedback.
All reactions