VirtualizationMode Enumeration
TOC
Collapse the table of content
Expand the table of content

VirtualizationMode Enumeration

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Specifies the method the VirtualizingStackPanel uses to manage virtualizing its child items.

Namespace:  System.Windows.Controls
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public enum VirtualizationMode
<objectproperty = "enumMemberName"/>

Member nameDescription
StandardCreate and discard the item containers.
RecyclingReuse the item containers.

By default, a VirtualizingStackPanel creates an item container for each visible item and discards it when it is no longer needed (such as when the item is scrolled out of view). When an ItemsControl contains many items, the process of creating and discarding item containers can negatively affect performance. When VirtualizationModeProperty is set to Recycling, the VirtualizingStackPanel reuses item containers instead of creating a new one each time.

When VirtualizingStackPanel cannot recycle item containers, it uses the standard mode of virtualization, which is to create and discard item containers for each item. The following list describes cases when the VirtualizingStackPanel cannot recycle item containers:

  • The ItemsControl contains item containers of different types.

  • You explicitly create the item containers for the ItemsControl.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2016 Microsoft