Layout Types and Inputs

Layout Types

The following options are available for preset layouts:

  • Anchor: Arranges children by anchoring edges (sizes to children).
  • Center: Fills the space by centering children on top of each other (sizes to parent).
  • Dock: Arranges children along the border of the parent (sizes to parent).
  • Fill: Makes children the size of the parent (sizes to parent).
  • Form: Arranges children by anchoring edges (sizes to parent).
  • Grid: Arranges children in a grid (sizes to children).
  • HorizontalFlow: Flows children in a horizontal orientation (sizes to children).
  • Rotate: Rotates children and includes space in layout (sizes to children).
  • Scale: Scales children and includes space in the layout (sizes to parent).
  • VerticalFlow: Flows children in a vertical orientation (sizes to children).

Or, to create a custom layout, use the following layout elements:

The view item's margins and padding create a buffer around the view item, which also affects these layout options.

Layout Inputs

Layout input provides for additional information for the parent to lay out the children. The following keywords are special values for identifying AnchorLayoutInput and FormLayoutInput objects:

  • Parent (refers to the parent element)
  • Focus (refers to the next item that has focus)

The following layout input elements allow you to further customize the layout:

  • The AnchorLayoutInput element lets you define the edges with respect to other items in the view item and the parent.
  • The DockLayoutInput element lets you specify alignment and position with respect to the borders of the view item.
  • The FormLayoutInput element lets you define the edges with respect to other items in the view item and the parent.

Sample Explorer

  • Layout > all samples

See Also