Freigeben über


IXRVirtualizingStackPanel::SetVirtualizationMode (Compact 2013)

3/28/2014

This method sets the virtualization mode for the content of this control.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetVirtualizationMode(
    __in  XRVirtualizationMode   VirtualizationMode
) = 0;

Parameters

  • VirtualizationMode
    [in] An XRVirtualizationMode enumerated value that defines how this control manages the memory used by virtualizing its child items.

Return Value

Returns an HRESULT that indicates whether or not the method succeeded.

Remarks

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.VirtualizingStackePanel.GetVirtualizationMode

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRVirtualizingStackPanel