Skip to content

Layout

Layout holds the controls that arrange children you write yourself: panels for several children, containers for one, scrolling, and panes. A control that builds its children from data is under Collections.

Panels

Page
Canvas Children placed at absolute left/top offsets (DIPs) from its top-left corner, drawn in z-index order.
Fill A child of a stack that is given the room the other children leave.
Grid A two-dimensional layout panel: children placed in cells of row and column tracks, each track Auto, a fraction of the remaining space, or fixed DIPs.
LayoutPanel A panel whose measure and arrange are delegated to an attachable Layout.
Panel The shared base of the layout panels that own a list of children: Canvas, WrapPanel, TilePanel, RelativePanel and LayoutPanel.
RelativePanel Lays out children relative to each other and to the panel's edges.
Spacer A gap in a stack that takes the room the other children leave.
Stack Lays its children out in a single column or row, spacing apart.
TilePanel A grid of equal cells that children fill in order, each spanning as many rows and columns of cells as it asks for, wrapping to a new line when one is full.
WrapPanel A panel that places its children one after another along a line and starts a new line when the next child would cross the far edge.

Containers

Page
Border One child inside a background, a border and padding.
DensityScope A wrapper that measures and draws its one child at compact or standard control density, which applies the compact sizing to one subtree.
Expander A header row that shows or hides one piece of content below or above it.
GroupBox A header over a group of related controls, with the group framed.
ScaleToFit One child, laid out at its natural size and drawn scaled to the room the ScaleToFit is given.
Shortcuts Keyboard shortcuts for one area of a window.
Toolbar A horizontal strip of commands, usually Buttons, with optional separators between groups.

Scrolling and Gestures

Page
AnnotatedScrollBar A vertical scroll bar with a rail you click or drag to jump, up and down step buttons, and offset annotations that stay visible and hide when they collide.
Parallax Moves its single child at a different rate than another element scrolls, typically a background image behind a list or scroll view.
PullToRefresh A container that refreshes its content when it is pulled past its start, with a progress indicator.
Scroll A viewport that scrolls and zooms one child, with overlay scroll bars.
Swipe Reveals a strip of action items beside its content when the content is dragged sideways: the "swipe a list row to reveal Delete/Archive" pattern.

Panes and Splitters

Page
ResizeGripper A fixed-size corner drag handle that reports two-axis deltas while dragged.
SidePane A content area with a pane beside it that opens, closes and collapses to a compact strip.
Splitter A draggable divider that resizes along one axis, between two Grid tracks or two panes.
TwoPane Two content panes that sit side by side when there is width, stacked when there is height, and collapse to one pane when there is neither.