Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The StackPanel element is used to stack child elements horizontally or vertically.
The following table lists common tasks for working with the StackPanel control:
| Title | Description |
|---|---|
| Choose Between StackPanel and DockPanel | Learn how to choose between using a StackPanel or DockPanel to arrange content. |
| Create a StackPanel | Learn how to create a StackPanel to arrange child elements. |
| Horizontally or Vertically Align Content in a StackPanel | Learn how to control the alignment of content within a StackPanel. |
Styles and templates
The StackPanel control is a panel that arranges child elements in a single line, either horizontally or vertically. It derives from Panel and doesn't define any template parts or visual states.
Content property
The StackPanel uses the Children property as its content property. This property contains the collection of child elements that are arranged by the panel.
See also
.NET Desktop feedback