ConstrainedSize

public struct ConstrainedSize : Element

Constrains the measured size of the contained element in the ranges specified by the width and height properties.

There are several constraint types available for each axis. See ConstrainedSize.Constraint for a full list and in-depth descriptions of each.

Notes

An important note is that the constraints of ConstrainedSize are authoritative during measurement. For example, if your ConstrainedSize specifies .atLeast(300) for width, and the ConstrainedSize is asked to measure within a SizeConstraint that is at most 100 points wide, the returned measurement will still be 300 points. The same goes for the height of the ConstrainedSize.