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 with images using Simple virtualization : autoscroll issue and smooth scrolling missing #8495

Closed
Whiletru3 opened this issue Jul 12, 2022 · 0 comments · Fixed by #9677
Labels

Comments

@Whiletru3
Copy link
Contributor

Whiletru3 commented Jul 12, 2022

Describe the bug
We ( @Tenjim and I) use a listbox for images in our app.
We are facing a lot of issues with the Virtualization Simple mode.

With virtualizing Simple :
There are no smooth scroll, only item scroll. So no possibility to scroll to the overflow part of the item if bigger than viewport.

If ListBoxItem is bigger than Viewport, the AutoScrollToSelectedItem display the N+1 item and never display the 0 (change SeletedItem textbox ot click First or Last button). So, a click on the item bring the next one. No issue if ListBoxItem is smaller than the Viewport (change the Zoom in textbox or CTRL + mousewheel)

With virtualizing none :
We are (of course) facing memory issues as every item and images are in memory (put 200 as ItemCount)
Is there a way to get the undisplayed ListBoxItems to flush the images manually ?

To Reproduce
In this github, you’ll find a Sample project VirtualizationImages to reproduce the issues (https://github.com/Tenjim/Avalonia/tree/stable/0.10.x)

Auto scroll issue :

  1. With virtualization Simple and AutoScrollToSelectedItem and a zoom of 0.5
  2. The bottom of item is never displayed and no smooth scroll
  3. Click on Select Last -> item19 is not seen
  4. Click on Select First -> item1 is displayed with no possibility to scroll up to get Item0. Item0 should be selected and displayed instead.
  5. Click on the displayed item, it select the current view and display the next one.
  6. Change the Selected item textbox will have the same behaviour (select the current view and display the next one)

Memory increase (not a bug :) )

  1. With virtualization None and AutoScrollToSelectedItem and a zoom of 0.5
  2. Put 200+ in Item count
  3. See the memory increase

Expected behavior
A smooth scroll and autoscroll to the right item using virtualization Simple

A With virtualization None, a workaround to manually flush the images in undisplayed items

Screenshots
image
image

Desktop (please complete the following information):

  • OS: Windows, Mac
  • Version 0.10.16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant