-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 bringing items into view with ItemsRepeater #4040
Closed
Closed
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
To diagnose problems with `ItemsRepeater`.
The default value needs to be the same as the default value in the associated `ItemsRepeater` properties.
Hack was added when porting `ItemsRepeater. Not sure it's needed anymore.
grokys
force-pushed
the
fixes/itemsrepeater-bringintoview
branch
from
June 1, 2020 14:04
caef2a2
to
bb1fe19
Compare
grokys
changed the title
WIP: Fix bringing items into view with ItemsRepeater
Fix bringing items into view with ItemsRepeater
Jun 1, 2020
This still seems to be broken with variable-height items in the ControlCatalog. |
`ItemsRepeater` doesn't work properly with a 0 cache length.
`OnEffectiveViewportChanged` needs to be triggered first, otherwise `_makeAnchorElement` is cleared too early, breaking scrolling in a list with variable-height items.
So one can see their bounds easily.
Instead of simply reading old `TranslatedBounds` value when `Bounds` changes, use the clip and transform from the previous `TranslatedBounds` with the new `Bounds`.
Closing this. Will reopen a new PR with this and #3436 combined as they're hard to separate. |
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?
ItemsRepeater
has problems with bringing items into view. This PR aims to fix themRequestBringIntoView
event inItemsRepeater
ItemsRepeater
andViewportManager
CompositionTarget.Rendering
event - we don't have that so just schedule it usingDispatcherTimer
)Note that this PR only fixes the issues on the Avalonia side. There are still bugs remaining in
ItemsRepeater
itself such as microsoft/microsoft-ui-xaml#1422