wpf icon indicating copy to clipboard operation
wpf copied to clipboard

ItemsControl with ItemsSource+VirtualizedStackPanel : bad scrollbar position after removing some items (different items heights)

Open JPDelprat opened this issue 1 year ago • 0 comments

Description

I have an ItemsControl with an ItemsSource and a VirtualizedStackPanel. Items have different heights. I move the scrollbar to the bottom of ItemsControls. I remove some items, so that scrollbar is still visible.

Resulting scrollbar position is invalid : only some of items which should be visible are on screen.

Reproduction Steps

Use the provided sample project : start the application than click on "Click to make bug appear" button. Both ItemsControl should be at the same scroll position, but they are not.

See attached picture. Bug

Here is the sample project, to reproduce the problem. SampleProject.zip

Expected behavior

See the sample project : both itemsControl should be at the same scrolling position.

Actual behavior

See the sample project : both itemsControl are not at the same scrolling position.

Regression?

No response

Known Workarounds

No response

Impact

No response

Configuration

No response

Other information

No response

JPDelprat avatar May 04 '24 10:05 JPDelprat