Appearance
Height
Use this element to control the veertical size of its content.
Method | Description |
---|---|
Height | Sets the exact height of its content. |
MinHeight | Sets the minimum height of its content. |
MaxHeight | Sets the maximum height of its content. |
Example
The following example demonstrates a container with a fixed height of 100 pt and a width of 200 pt.
c#
container
.Width(300)
.Padding(25)
.Height(100)
.AspectRatio(2f, AspectRatioOption.FitHeight)
.Background(Colors.Grey.Lighten1);
DANGER
Please be careful. This component may try to enforce size constraints that are impossible to meet. For example, the container may require more space than is available, or may try to squeeze its child into less space than possible.
Such scenarios result in a layout exception.