#429 – Child Element Properties that Affect Layout

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)
  • MinWidthminimum width of the element
  • MinHeightminimum height of the element
  • MaxWidthmaximum width of the element
  • MaxHeight – maximum height of the element

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

One Response to #429 – Child Element Properties that Affect Layout

  1. Pingback: Dew Drop – November 14, 2011 | Alvin Ashcraft's Morning Dew

Leave a comment