Initializes any per-container state the layout requires when it is attached to an
- Containing Type
public void InitializeForContext(LayoutContext context)
Container elements that support attached layouts should call this method when a layout instance is first assigned. 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. It is also the responsibility of the container to not reuse the context, or otherwise expose the state from one layout to another. When an attached layout is removed the container should release any reference to the layout state it stored. Override
Avalonia.Layout.VirtualizingLayout.InitializeForContextCore(Avalonia.Layout.VirtualizingLayoutContext)to provide the behavior for this method in a derived class.
|context||LayoutContext||The context object that facilitates communication between the layout and its host container.|