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

Allow binding container IsVisible with virtualization. #14276

Merged

Conversation

grokys
Copy link
Member

@grokys grokys commented Jan 19, 2024

What does the pull request do?

Allow binding the IsVisible property on containers in a virtualized ItemsControl.

Use SetCurrentValue to update the container IsVisible state when realizing and recycling so that the visible state can be bound.

Fixed issues

Fixes #13991

Use `SetCurrentValue` to update the container `IsVisible` state when realizing and recycling so that the visible state can be bound.

Fixes #13991
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.1.999-cibuild0043760-beta. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@maxkatz6 maxkatz6 added the backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch label Jan 19, 2024
@maxkatz6 maxkatz6 added this pull request to the merge queue Jan 19, 2024
github-merge-queue bot pushed a commit that referenced this pull request Jan 19, 2024
Use `SetCurrentValue` to update the container `IsVisible` state when realizing and recycling so that the visible state can be bound.

Fixes #13991
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jan 20, 2024
@maxkatz6 maxkatz6 merged commit 3911fe3 into master Jan 21, 2024
7 checks passed
@maxkatz6 maxkatz6 deleted the fixes/13991-recycling-items-with-isvisible-bindings branch January 21, 2024 07:06
maxkatz6 pushed a commit that referenced this pull request Feb 8, 2024
Use `SetCurrentValue` to update the container `IsVisible` state when realizing and recycling so that the visible state can be bound.

Fixes #13991
@maxkatz6 maxkatz6 added backported-11.0.x and removed backport-candidate-11.0.x Consider this PR for backporting to 11.0 branch labels Feb 8, 2024
@adirh3
Copy link
Contributor

adirh3 commented Feb 27, 2024

Edit: it's probably related to other change since December. I will create an issue once I am able to reproduce it outside my app.
@grokys FYI I believe that since this PR there are weird glitches in ListBox (and anything else that uses virtualization) -
I
image
The red item there with YouTube icon is not part of the items in the data model, it got stuck there only visually as items changed in the list.

I checked using latest master, trying to investigate it, but if you have an idea what may cause this please lmk

@timunie
Copy link
Contributor

timunie commented Feb 28, 2024

@adirh3 there is a similar issue open. #13736

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.

Binding ListBoxItem.IsVisible not working with VirtualizingStackPanel
5 participants