Skip to main content
Version: 0.10.x

Panel

The Panel is the base class for controls that can contain multiple children like DockPanel or StackPanel.

The Panel class can be useful on its own for very basic layouts, or simply to allow multiple controls to be to be contained.

<Panel Height="300" Width="300">
<Rectangle Fill="Red" Height="100" VerticalAlignment="Top"/>
<Rectangle Fill="Blue" Width="100" HorizontalAlignment="Right" />
<Rectangle Fill="Green" Height="100" VerticalAlignment="Bottom"/>
<Rectangle Fill="Orange" Width="100" HorizontalAlignment="Left"/>
</Panel>

There are other more useful panels that derive from Panel, these include:

StackPanel

DockPanel

RelativePanel

WrapPanel

Reference

Panel

Source code

Panel.cs

Panels Overview

Create a custom panel