Skip to content

How to filter ListBox items without needing to replace the whole ItemsSource collection? #15265

Answered by thevortexcloud
Nemonek asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think there is a specific docs page for it. You are using a WrapPanel which is not virtualised. As such it will attempt to render/realise everything at once. A virtualised panel however will only attempt to render/realise what is visible on screen (plus some buffer on either side to allow for smooth scrolling). This results in:

  • Lower memory usage
  • Lower CPU usage
  • Better UI responsiveness

Depending on what you are doing, a virtualised panel is the only way to get decent performance. EG trying to display >3k images in image gallery is nearly impossible on most hardware without it. But because only things you can see actually exists in the panel, it can result in some weird visual i…

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
3 replies
@Nemonek
Comment options

@thevortexcloud
Comment options

Answer selected by Nemonek
@Nemonek
Comment options

Comment options

You must be logged in to vote
10 replies
@CodeDevAM
Comment options

@thevortexcloud
Comment options

@CodeDevAM
Comment options

@Nemonek
Comment options

@CodeDevAM
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants