-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Fill ScrollView when content is smaller than viewport #7514
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Eilon
added
the
area-layout
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
label
May 26, 2022
/azp run |
Azure Pipelines successfully started running 2 pipeline(s). |
mattleibow
reviewed
Jun 2, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I think this will require an update to the publicapi.txt, but testing to see how to do a remove.
-public override void PlatformArrange(Rect frame)
+public override Size GetDesiredSize(double widthConstraint, double heightConstraint)
mattleibow
approved these changes
Jun 2, 2022
jsuarezruiz
approved these changes
Jun 3, 2022
This was referenced Jul 11, 2022
Eilon
added
area-controls-scrollview
ScrollView
and removed
area-layout
StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter
labels
May 14, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
When the content of MAUI ScrollViews is less than the size of the viewport and the content is set to Fill, the content remains at the small size rather than filling the viewport. These changes ensure that the content fills the viewport of the ScrollView on each platform.
This also moves several of the automated ScrollView unit tests to device tests (since differences in the platform ScrollView implementations mean that the actual layout of ScrollView content is platform-dependent).
Finally, this adds an actual vertical content alignment to the iOS Label implementation; the previous implementation (which attempted to align the content by adjusting the UILabel's Frame) caused complications and bugs with nested content (e.g., a Label with a Background inside a ScrollView).
Issues Fixed
Fixes #6058
Fixes #6694