Share via


Layout.UninitializeForContext(LayoutContext) Method

Definition

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).

public:
 virtual void UninitializeForContext(LayoutContext ^ context) = UninitializeForContext;
void UninitializeForContext(LayoutContext const& context);
public void UninitializeForContext(LayoutContext context);
Public Sub UninitializeForContext (context As LayoutContext)

Parameters

context
LayoutContext

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

Remarks

Container elements that support attached layouts should call this method 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.

Override NonVirtualizingLayout.UninitializeForContextCore or VirtualizingLayout.UninitializeForContextCore to provide the behavior for this method in a derived class.

Applies to

See also