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
ScrollView content needs layout when ScrollView.InvalidateMeasure is called #17639
ScrollView content needs layout when ScrollView.InvalidateMeasure is called #17639
Conversation
Ah! Deleted the wrong branch by accident. Good thing I could restore it and reopen this PR. |
6688c8b
to
d443403
Compare
d443403
to
1c05ee4
Compare
@spadapet I think you're on the right track, but the re-mapping of the InvalidateMeasure command could cause problems for users who've modified the base mapping. @PureWeen and @mattleibow and I are working out how we can handle this sort of Core-level remapping to avoid that problem (#17918). In the meantime, I dropped the |
@hartez thanks for looking, I'll re-check the scenario with and without the fix. I'm pretty sure the test used to fail on Windows without the fix. And this fix can wait for #17918 if necessary. |
1c05ee4
to
21bca04
Compare
@hartez I found out that if I added a delay in the test, then the bug does repro. Without the delay, it's too fast for the UI to render and the bug doesn't repro. Since that doesn't quite make sense to me yet, I'll push new changes once I understand that a little more. |
@hartez, @PureWeen, my latest pushed changes are ready for review. Although I know the pending draft PR #17918 might affect my fix. If I have to wait for that other PR, let me know. I feel weird adding an |
bfc80f6
to
56264fb
Compare
Sorry, this week was overwhelmed by launch stuff, travel, and upcoming holidays. @mattleibow and @PureWeen - any reason we can't take this as-is, and then update it ourselves pending the outcome of #17918? |
/rebase |
56264fb
to
0f7f57f
Compare
0f7f57f
to
663277e
Compare
663277e
to
4f6200f
Compare
Pull Request is not mergeable
Description of Change
When
ScrollView.Content
changes its alignment (likeHorizontalOptions
change fromStart
toEnd
), then theScrollView
's layout needs to properly update. It worked on Android and Mac/iOS, but Windows would not update layout until the window was resized.After
HorizontalOptions
changed on the content, Windows would callInvalidateMeasure
on the WinUIScrollView
, but the child content didn't get updated. This change makes sure that the content also gets measured.This fix is helpful for XAML Hot Reload, so the layout will update as
HorizontalOptions
changes.Issues Fixed
Fixes #14377