What is actually happening in VirtualizingStackPanel.VirtualizationMode = Recycling/Standard.?
What is actually happening in VirtualizingStackPanel.VirtualizationMode = Recycling/Standard.?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
When
VirtualizationModeis set toRecycling, theVirtualizingStackPanelwill reuse item containers instead of having to create a new one.If we start out with this
And scroll one position down, so Data 1 is scrolled out of view and Data 4 is scrolled into view then Recyling will take the item container for Data 1 and reuse it for Data 4.
I’ve had some problems with this when using attached properties for the Item container, e.g Green background if I have entered edit mode for Container 1. Scrolling down and Data 4 will also have Green background since the Attached Property was still set.
When
VirtualizationModeis set toStandard, theVirtualizingStackPanelwill create and discard item containers instead of reusing them.