Table of Contents

Method MeasureChildrenBounds

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

MeasureChildrenBounds(SizeD?)

Measures the bounds required to accommodate all child elements, considering their preferred sizes, padding, and margins. Result includes padding of the control itself.

public virtual SizeD MeasureChildrenBounds(SizeD? availableSize = null)

Parameters

availableSize SizeD?

The size available for measuring the child elements. If null or zero, available size is not limited.

Returns

SizeD

A SizeD representing the total bounds required to fit all child elements, including their padding and margins.

Remarks

The method calculates the maximum bounds required to fit all visible child elements based on their preferred sizes and padding. If any child elements extend beyond the calculated bounds due to their margins, the bounds are adjusted to include those margins.