#429 – Child Element Properties that Affect Layout
November 14, 2011 1 Comment
Layout panels, like StackPanel and Grid, server as containers, containing child elements whose type is UIElement. (In reality, most child elements derive from FrameworkElement, which in turns derives from UIElement).
Layout panels honor the following properties of their child elements. These properties are all defined in FrameworkElement.
- HorizontalAlignment - Horizontal alignment of an element (left, center, right, stretch)
- VerticalAlignment - Vertical alignment of an element (top, center, bottom, stretch)
- Margin - space between elements or between an element and the edge of the containing area
- Width - width of element (in device indepent units, inches, cm, points, or auto)
- Height - height of element (in device indepent units, inches, cm, points, or auto)
- MinWidth – minimum width of the element
- MinHeight – minimum height of the element
- MaxWidth – maximum width of the element
- MaxHeight - maximum height of the element