VirtualizationMode Attached Property
Collapse the table of content
Expand the table of content

VirtualizingStackPanel.VirtualizationMode Attached Property

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

Gets or sets how a panel in an ItemsControl virtualizes its child items.

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

See GetVirtualizationMode, SetVirtualizationMode
<object VirtualizingStackPanel.VirtualizationMode="Standard"/>
-or-
<object VirtualizingStackPanel.VirtualizationMode="Recycling"/>

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 a lot of items, the process of creating and discarding item containers can negatively affect performance. When the VirtualizationMode attached property 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.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft