-
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
ListView inside ContentView inside StackLayout: scrolling does not work #24455
Comments
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you! Open similar issues:
Closed similar issues:
|
I believe you're seeing this. In short, you shouldn't put a ListView inside a StackLayout as the controls inside of the StackLayout are not constrained unless you specifically set up the heights/widths. So, unless you specifically set constraints for the ListView, it's going to render the entire List (breaking Virtualization) and generally won't be scrollable. So the right thing to do here is use a Grid, since then it should have proper constraints for the heights. @PureWeen is my reading on this correct? |
Thanks for the comment, @drasticactions. In fact I have seen this issue (and similar ones). But the thing that I really don't understand is: Why does it make a difference for the behavior, whether I put the |
This issue has been verified using Visual Studio 17.12.0 Preview 1.0(8.0.80 & 8.0.72). Can repro on iOS and Android platforms. |
Duplicate of #24078 |
Description
The scrolling of ListViews (and similar controls) seems to be broken under certain circumstances. I observed this in several cases (mostly with ListViews and TableViews) and could trace it down to the condition that the
ListView
is inside aContentView
, which itself is inside aStackLayout
. See reproducer below, which is derived from the ListViewDemos in the maui-samples repo (and also contains a workaround for #24308).I see the problem both on Android (v14), where almost no scrolling is possible, and on iOS (v16.7), where it seems to work a bit better, but still one cannot scroll all the way down to the bottom of the list.
Probably the root cause of the issue is a problem with the sizing of the ListView (which does not seem to be constrained probably)?
Steps to Reproduce
Link to public reproduction project repository
https://github.com/janusw/maui-samples/tree/ListView_bug_repro/8.0/UserInterface/Views/ListViewDemos
Version with bug
8.0.80 SR8
Is this a regression from previous behavior?
Not sure, did not test other versions
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android
Affected platform versions
seen on Android 14, iOS 16
Did you find any workaround?
Relevant log output
No response
The text was updated successfully, but these errors were encountered: