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

ListBox virtualization with smooth scrolling. #1909

Closed
x2bool opened this issue Sep 19, 2018 · 6 comments
Closed

ListBox virtualization with smooth scrolling. #1909

x2bool opened this issue Sep 19, 2018 · 6 comments

Comments

@x2bool
Copy link

x2bool commented Sep 19, 2018

Right now Avalonia provides only two virtualization methods: None and Simple. The first one provides ablility to scroll smoothly but does not virtualize items. It would be nice to have third option with smooth scrolling and virtualization.

Theoretically views like this exist in other GUI frameworks: an example would be Android's RecyclerView.

@jmacato
Copy link
Member

jmacato commented Sep 19, 2018

@x2bool You're welcome to file an PR for that smooth-scroll virt 😄 I think either SmoothItemVirtualizer or SeamlessItemVirtualizer would be a good name for that but that's subject to change anyway

@ashelleyPurdue
Copy link

I've made a sloppy, hacky, proof-of-concept implementation. It works by shifting the virtual items panel up/down to simulate scrolling "in between" items.

I wouldn't put this code directly into Avalonia, since it probably follows none of Avalonia's recommended patterns. It's just to throw an idea out there for how an implementation would work.

https://gist.github.com/ashelleyPurdue/c81fcb706079d4736c20380c067c5156

@jmacato
Copy link
Member

jmacato commented Sep 3, 2019

@ashelleyPurdue I think this is already solved by @grokys 's ItemsRepeater control (based on its UWP counterpart).

@ashelleyPurdue
Copy link

Even better!

@grokys
Copy link
Member

grokys commented Sep 28, 2019

I'm going to close this issue and track the transition to ItemsRepeater for ListBox etc over at #2594.

@grokys grokys closed this as completed Sep 28, 2019
@Whiletru3
Copy link
Contributor

Hello,

@grokys : As the #2594 is a dead end and won't be fixed, this issue need to be reopened.
The issue #8495 expose in a sample project the issues with the Listbox simple virtualization.

Thanks :)

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

No branches or pull requests

5 participants