Repository navigation
Fix VirtualizingStackPanel ScrollToEnd with variable-sized items - #22014
Merged
Merged
Conversation
Keep the initial viewport before the variable-sized trailing items and exercise ScrollToEnd directly.
|
You can test this PR using the following package version. |
|
You can test this PR using the following package version. |
emmauss
approved these changes
Aug 24, 2026
MrJul
enabled auto-merge
August 24, 2026 13:41
This was referenced Aug 27, 2026
MrJul
pushed a commit
to MrJul/Avalonia
that referenced
this pull request
Sep 2, 2026
…loniaUI#22014) * Fix VirtualizingStackPanel ScrollToEnd with variable-sized items * Refine VirtualizingStackPanel ScrollToEnd regression test Keep the initial viewport before the variable-sized trailing items and exercise ScrollToEnd directly. --------- Co-authored-by: Emmanuel Hansen <emmausssss@gmail.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What does the pull request do?
Fixes
VirtualizingStackPanelfailing to scroll to the actual end whenScrollBar.ScrollToEnd()is called and trailing items have different sizes.What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
When the viewport reaches the current panel end before all items have been
measured,
VirtualizingStackPaneluses the last item as the realization anchor.After measuring that item, its position is corrected using the actual size so
the extent and offset can be synchronized to the real end.
Checklist
Fixed issues
Fixes #22013