I'm using WPF/.NET 4 and when I add the VirtualizingStackPanel.VirtualizationMode="Recycling" property to my ListBoxes, it causes the same list items to be repeated over and over when scrolling. For example, let's say I have a ListBox with 100 items and 10 are visible at a time. When the ListBox first loads I see items 1 - 10, but when I start scrolling down to see the remaining items 11 - 100, items 1 - 10 are repeated over and over as I scroll down, so I'm never able to view items 11 - 100. If I change Recycling back to Standard, then everything works correctly, but the scrolling is horribly slow (my ListItems are fairly complex, with several images, text fields, and buttons in them). When Recycling is on, the scrolling is super fast, but I can only ever view items 1 - 10. Any ideas on what's wrong or how to fix it? Thanks in advance.
WPF ListBox VirtualizingStackPanel.VirtualizationMode="Recycling" causes same list items to always appear
3.3k Views Asked by deadlydog At
1
There are 1 best solutions below
Related Questions in .NET
- file download method in visual studio 2017
- Repository manager receives the wrong connection string in .net core
- MongoDb not connecting C#
- The current .NET SDK does not support targeting .NET Core 6.0. Brand new WPF Project VS Community 2022 17.9.5
- Why Scanning GSI on DynamoDb doesnt work as fast as expected when using CONTAINS?
- Are "blittable types" really unmanaged types for StructLayout Sequential
- Failed to fetch dynamically imported module on Blazor JS Interop
- Problem to upload several images per one request
- Implementing Azure AD B2C Authentication in .NET 8 Blazor Project (RenderMode: InteractiveAuto)
- Stripe connect payout - throws exceptions
- 'IOException: The cloud file provider is not running', when trying to delete 'cloud' folder
- Azure Application Insights Not Displaying Custom Logs for Azure Functions with .NET 8
- Convert C# DateTime.Ticks to Bigquery DateTime Format
- Socket.io nodejs server .NET connection
- Producer Batching Service Bus Vs Kafka
Related Questions in WPF
- Sorting a List by its property renames all the objects in the List
- Can't open new instance of another window in my app, in WPF .NET 8
- Binding forecolour and ToolTip to a DataGrid
- how to create Infinite Upgrades in a clicker game
- Try Catch exception is not catching the unhandled exception
- Assigning an object to another doesn't raise PropertyChanged event in WPF
- Masking input in TextBox
- What should I do if Visual Studio has a restriction on creating files with a long name or a long path to these files?
- reading configuration file (mytest.exe.config)
- WPF Windows Initializing is locking the separated thread in .Net 8
- How to bind to the DataContext ViewModel of another view?
- mouse coordinates in image go below 0 and above width
- WPF pop up is behaving differently in English language PC and Japanese language PC
- Multi level project reference using dll
- Unable to unzip archive .NET framework
Related Questions in LISTBOX
- How to MakeScreenshot fullpage on Delphi
- How to populate a ListBox with SendMessage?
- Tkinter: How to delete items in listbox from a different window Tkinter
- How to change an item in a list forever?
- Tkinter: Listbox not populating from function call, populates from list
- TypeError: 'StringVar' object is not iterable -- tkinter ListBox()
- cdk listbox with selection "forced by code" doesn´t show as selection "by hand"
- How to save as string each item selected in listbox
- VBA listbox_click event - itemsselected not registering
- ListBox does not include newly added lines to source table because of RowSource
- Synchronization Delay Between Context Menu and Selected Row in WPF ListBox
- Is there a more efficient way to search for text from ListBox in a text in C#?
- How can I divide 2 namens and convert them to a E-Mail Adress with lixtboxes? (Visual Baisc 2010)
- How do I add all items form my database to my listbox and a counter?
- Listbox not showing data in mvvm wpf
Related Questions in VIRTUALIZATION
- How to Create a Data Table Visualization in Kibana with Nested Aggregation Fields?
- Calcite and Avatica to expose a data warehouse as a virtual database
- Passing Intel-PT to guest using QEMU/KVM doesn't work
- AWS EC2 export-image Task Fails with Error "Unsupported architecture 183 for 6.2.0-1017-aws"
- Docker - Bridge docker container to eth interface on host network container
- what happens when an external interrupt is received by the host in a virtual setting
- how does irqfd trigger interrupt in the guest
- How to monitor vcpu registers with kvm_sync_regs in kvm_run?
- How to run xorg in docker with custom edid?
- GenyMotion virtual devices do not have internet
- problem in libvirt service with g_hash_table_unref?
- x86_64 android emulator on mac arm
- why this error occurs in opensuse as a host, that has 2 hypervisor on it?
- podman start stuck on "Waiting for VM..."
- How to Creating a Data Disk Image from an External Image File in Huawei Cloud Stack?
Related Questions in RECYCLE
- I am passing data to the recycleView in reverse order. But I got an error somewhere
- Nested Recycle view using a Parent list inside a Child List and remove all data Child list and remove a parent list position in android kotlin?
- How to save and return an ArrayList from my recycleview adapter after reorder it in recycleview.widget(xml)
- NET. 6 on Docker Container and Application Pool Recycle
- How to avoid recycling while trying to replace values from a vector in a dataframe column
- How to return a new object when the current object is recycled in Java
- Using Java can I programmatically undelete a file under Windows?
- Recycle all app pools with a .bat file with a delay between each one
- Inconsistent recycling in R?
- PowerShell IIS How to make each recycle period 2 minutes apart
- Disable recycling for configuration and alternative ways to do it for IIS and AppPool
- IIS 10 application pool slow initialization times after recycle
- How the Mainframe application handle CICS Recycles
- Relation between System.Buffers.dll and recycle IIS Pool
- generate a column of random numbers
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Recycling Mode works, as it name implies, by reusing rendered ListBoxItems. When a ListBox item is no longer needed to display an item that has scrolled off the list, the ListBox will reuse it to display one that has scrolled into view.
To change what the ListBoxItem is displaying, the ListBox simply sets its DataContext property to the new item. This requires that the contents of the ListBoxItem have to respond correctly to DataContextChanged events. If you are using only using databinding to populate the controls, this will happen automatically. But if, as your comment implies, you are using some code-behind to update the properties, then you need to make sure that your event handling code is doing the job.