AttachedLayout.

Measure(LayoutContext, Size) Method

Summary

Suggests a DesiredSize for a container element. A container element that supports attached layouts should call this method from their own MeasureOverride implementations to form a recursive layout update. The attached layout is expected to call the Measure for each of the container’s ILayoutable children.
Namespace
Avalonia.Layout
Containing Type
AttachedLayout

Syntax

public Size Measure(LayoutContext context, Size availableSize)

Parameters

Name Type Description
context LayoutContext The context object that facilitates communication between the layout and its host container.
availableSize Size The available space that a container can allocate to a child object. A child object can request a larger space than what is available; the provided size might be accommodated if scrolling or other resize behavior is possible in that particular container.

Return Value

Type Description
Size