Skip to content
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

WIP: Use ItemsRepeater as base for ItemsPresenter #2 #4779

Closed
wants to merge 46 commits into from

Conversation

grokys
Copy link
Member

@grokys grokys commented Sep 30, 2020

What does the pull request do?

WIP on using ItemsRepeater as the base for ItemsPresenter to fix our janky virtualization.

This is a long-term PR intended for some point between 0.10 and 0.11. Numerous breaking changes.

Fixes #2594

They will be used/exposed on `IItemsPresenter` so will no longer be necessarily specific to `ItemsRepeater`.
Mostly working, although `Carousel` is currently non-functional.
Mark inline items (e.g. a `ListBoxItem` appearing directly in a `ListBox.Items` collection) as non-recyclable.
- Move interaction logic out of `SelectingItemsControl`
- Don't select item when getting focus
- Use ctrl+direction to move focus without changing selection
- Bring focused control into view
`ItemsRepeater` should handle this for us (though doesn't always seem to get it right, due to a bug I think).
We need to make `ItemsSourceView` handle `IReadOnlyList<object>` as well as plain `IList`. This however exposed a problem where `CollectionChanged` events were still not getting to their handlers in the correct order, so did a bit of refactoring of `ItemsSourceView`.
Ensure necessary assemblies are loaded.
It throws. Also remove the key handling from `SelectingItemsControl` - it shouldn't handle interaction.
`Algorithm_GetAnchorForTargetElement` can return -1 and when it does so we try to realize that item, which obviously doesn't exist, so boom.
- Display number of realized containers
- Allow switching between data templated items and inline `ListBoxItem`s
And update summary.
...when removed from source items.
@grokys
Copy link
Member Author

grokys commented Sep 9, 2021

Closing: #2594 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use ItemsRepeater in ListBox etc
1 participant