Share via


VirtualizingLayout.UninitializeForContextCore Method

Definition

When overridden in a derived class, removes any state the layout previously stored on the UIElement container.

This documentation applies to WinUI 2 for UWP (for WinUI in the Windows App SDK, see the Windows App SDK namespaces).

void UninitializeForContextCore(VirtualizingLayoutContext const& context);
protected virtual void UninitializeForContextCore(VirtualizingLayoutContext context);
Protected Overridable Sub UninitializeForContextCore (context As VirtualizingLayoutContext)

Parameters

context
VirtualizingLayoutContext

The context object that facilitates communication between the layout and its host container.

Remarks

Override this method in a derived class to provide the behavior for calls to Layout.UninitializeForContext(Microsoft.UI.Xaml.Controls.LayoutContext).

Container elements that support attached layouts should call UninitializeForContext when a layout instance is disassociated with the container. The container is expected to give the attached layout instance a way to store and retrieve any per-container state by way of the provided context.

Applies to

See also