AspectRatioContainer.StretchMode

Values

ValueMeaning
stretchWidthControlsHeight0

The height of child controls is automatically adjusted based on the width of the container.

stretchHeightControlsWidth1

The width of child controls is automatically adjusted based on the height of the container.

stretchFit2

The bounding rectangle of child controls is automatically adjusted to fit inside the container while keeping the aspect ratio.

stretchCover3

The width and height of child controls is automatically adjusted to make their bounding rectangle cover the entire area of the container while keeping the aspect ratio. When the bounding rectangle of child controls exceed the container's size and Control.rectClipContent is enabled, this allows to show only the container's area restricted by its own bounding rectangle.

Meta