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

Variable Size Items with LogicalScrolling / Virtualized StackPanel #1758

Closed
danwalmsley opened this issue Jul 17, 2018 · 5 comments
Closed
Assignees
Milestone

Comments

@danwalmsley
Copy link
Member

You can repro with the virtualisation demo.

  1. Change the item template so each item is an expander.
  2. add a 200x200 grid inside the expander.
  3. add a load of items so that scrolling is needed.
  4. expand an item near bottom of list so its partially obscured.
  5. scroll down, it should crash trying to recycle items when it shouldn't.

I think there are a couple of things:

logical scrolling is assuming fix sized items,
virtualized stack panel is calculating the number of items to recycle bases on the logical scroll size (fixed)

@danwalmsley danwalmsley added this to the 0.7.0 milestone Jul 17, 2018
@grokys
Copy link
Member

grokys commented Jul 17, 2018

I've just tried this repro in the VirtualizationDemo project and I can't reproduce. What am I missing?

@grokys
Copy link
Member

grokys commented Jul 17, 2018

Also a stacktrace, or at least the type of the exception thrown would be useful.

@danwalmsley
Copy link
Member Author

not able to repro the crash yet, but here you can see symptoms that point to the same issue:
virtualizer-bug

repro here:

  1. the last item doesn't adjust the scrollbar enough when the item is expanded.

  2. scrolling back up the list recycles the container causing different items to be expanded.

I suspect #2 will be hard to fix if not impossible :)

@danwalmsley
Copy link
Member Author

It has been determined at least that the issue with the expanded item moving up is that this is caused by recycling.

Will try to do a PR for a VirtualizationMode="Simple" and VirtualizationMode="Recycling"

@danwalmsley
Copy link
Member Author

Ok I realised its pointless as you still loose the state of the items.

The real solution is to bind the state you need to persist.

I was seeing some crashing so I will leave open until I confirm that.

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

No branches or pull requests

2 participants