July 2017
Beginner
466 pages
9h 37m
English
The DockPanel allows you to dock the child elements to any one of the four sides (top, right, bottom, or left). By default, the last element (if not given any specific dock position) fills the remaining space. You can use it when you need to divide your window to regions and/or use when you want to place one or more elements to any of the sides.
As shown in the following code snippet, you need to set the DockPanel.Dock attribute of the child elements to one of the four values:
<DockPanel Background="LightCyan"> <Border Width="150" Height="50" DockPanel.Dock="Bottom" Background="YellowGreen"> <TextBlock Text="Bottom Docking" HorizontalAlignment="Center" VerticalAlignment="Center"/> </Border> <Border ...
Read now
Unlock full access