-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
CollectionView in VerticalStackLayout different behavior on different platforms #15148
Comments
Hi @marekm294. We have added the "s/needs-repro" label to this issue, which indicates that we require steps and sample code to reproduce the issue before we can take further action. Please try to create a minimal sample project/solution or code samples which reproduce the issue, ideally as a GitHub repo that we can clone. See more details about creating repros here: https://github.com/dotnet/maui/blob/main/.github/repro.md This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
@hartez sorry, there was weird formatting in Steps to reproduce and therfore you didn't probably see code example. There's nothing more than empty collectionView in VerticalStackLayout in ContentPage. (App uses Shell but it's probably same without Shell). VerticalStackLayout images was added only as proof that VSL covers whole page and therefore the problem is probably CollectionView. |
Verified this on Visual Studio Enterprise 17.7.0 Preview 3.0. Repro on Windows 11, Android 13.0-API33 and iOS 16.4 with below Project: |
In general, I would warn against putting an unconstrained CollectionView in a VerticalStackLayout. By design, VerticalStackLayout wants to expand to the height of its content, and CollectionView wants to expand to the height of its container, which leads to a horrible experience in terms of layout and performance. You're going to want to put a HeightRequest on CollectionView or use a Grid layout with a * row. Does that give you the results you expect? Thanks! |
Hi @marekm294. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time. |
We found out we should use Grid instead of VSL but I expected it should have same behavior on all platforms when it's possibe to do sth like that. |
Duplicate of #24078 |
Description
Collection View does behave differently on different plaftofm
On Android:
Even though empty verticalStackLayout is filled
On iOS
Empty verticalStackLayout is same as on android
On Windows:
Empty VerticalStackLayout is again filled.
On Mac:
Empty VerticalStackLayout is again filled.
There's bonus. On Mac is CollectionView filled only when app is not in full screen. When you resize app to full screen, collectionView size doesn't change. There's whitespace but it may not be visible well.
Steps to Reproduce
Use this in ContentPage
or this
Link to public reproduction project repository
Version with bug
7.0.86
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS
Affected platform versions
Windows 11, iOS 16.4.1, Android 11, Mac unknown(probably latest)
Did you find any workaround?
no
Relevant log output
No response
The text was updated successfully, but these errors were encountered: