次の方法で共有


XRVirtualizationMode (Compact 2013)

3/28/2014

This enumeration contains values that describe the method that an IXRVirtualizingStackPanel object uses to manage the memory used by virtualizing its child items.

Syntax

enum XRVirtualizationMode
{
        XRVirtualizationMode_Standard,
        XRVirtualizationMode_Recycling,
};

Members

  • XRVirtualizationMode_Standard
    Indicates that the IXRVirtualizingStackPanel creates an item container for each visible item and discards the container for an item when it is no longer needed (for example, when the item scrolls out of view).
  • XRVirtualizationMode_Recycling
    Indicates that the IXRVirtualizingStackPanel reuses discarded item containers for new visible objects. This is the default mode.

Remarks

Virtualization refers to a technique by which a subset of UI elements is generated from a larger set of data items based on the items that are visible on the screen. Through functionality that is provided by the parent IXRVirtualizingPanel class, IXRVirtualizingStackPanel objects calculate visible items and work with an internal implementation of the ItemContainerGenerator from an IXRItemsControl (such as IXRListBox) to create UI elements only for visible items.

When the VirtualizationMode property is set to XRVirtualizationMode_Recycling, (the default), an IXRVirtualizingStackPanel object reuses item containers instead of creating a new one each time. If the IXRVirtualizingStackPanel object cannot recycle item containers, it uses the standard mode of virtualization, XRVirtualizationMode_Standard, in which item containers are created and discarded for each item. However, when an IXRItemsControl object contains many items, the process of creating and discarding item containers in standard virtualization mode can negatively affect performance.

.NET Framework Equivalent

System.Windows.Controls.VirtualizationMode

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

XAML for Windows Embedded Enumerations
IXRVirtualizingStackPanel::SetVirtualizationMode
IXRVirtualizingStackPanel::GetVirtualizationMode