-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Fix missing Orientation check in VirtualizingStackPanel #17135
Fix missing Orientation check in VirtualizingStackPanel #17135
Conversation
You can test this PR using the following package version. |
Thanks! Could you please add unit tests? We already got |
Ok, I'll have a look tomorrow. |
…Smaller/Larger]_Items for the horizontal orientation
…age_Of_[Smaller/Larger]_Items for the horizontal orientation" This reverts commit 9aa7ac2.
…ckpanel-viewport-horizontal
You can test this PR using the following package version. |
Thank you for adding the tests! |
Thank you for the clue. I tried to set the SV Template after changing the scroll Orientation, but that do not work better. Unfortunatly, I have errors building the Avalonia project, so I cannot debug the Tests. |
Oh, it seems to only miss a
Ensure that the submodules are up-to-date with |
Thanks a lot @MrJul |
You can test this PR using the following package version. |
@@ -0,0 +1,12 @@ | |||
{ |
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.
I think you've committed this file by mistake?
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.
Argh, sorry about that, I fixed it.
This reverts commit 8f304d0.
You can test this PR using the following package version. |
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.
LGTM, thanks!
* Fix missing Orientation check in VirtualizingStackPanel > CalculateMeasureViewport * Added UnitTests ScrollIntoView_Correctly_Scrolls_Right_To_A_Page_Of_[Smaller/Larger]_Items for the horizontal orientation * Revert "Added UnitTests ScrollIntoView_Correctly_Scrolls_Right_To_A_Page_Of_[Smaller/Larger]_Items for the horizontal orientation" This reverts commit 9aa7ac2. * Added VirtualizingStackPanelTests horizontal unittests * Changed SV orientation before settings Template * fixed missing orientation on target * Revert "fixed missing orientation on target" This reverts commit 8f304d0. * Fix missing orientation assignment.
What does the pull request do?
The PR is a fix for a missing orientation check in VirtualizingStackPanel's CalculateMeasureViewport method.
It should solve the following bug: #17125
What is the current behavior?
ListBoxBug.mp4
What is the updated/expected behavior with this PR?
ListBoxOk.mp4
How was the solution implemented (if it's not obvious)?
anchorU = orientation == Orientation.Horizontal ? _scrollToElement.Bounds.Left : _scrollToElement.Bounds.Top;
instead of
anchorU = _scrollToElement.Bounds.Top;
Checklist
Breaking changes
None
Obsoletions / Deprecations
Fixed issues
Fixes #17125