Introduction

Dock panel is panel which allows you to arrange controls on left, right, top and bottom. At the time of control adding you have to set the property DockPanel.Dock either on left, right, top, and bottom.

For Example

	<Window x:Class="WpfApplication2.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Tech Altum" Height="500" Width="700">

    <DockPanel>
        <Button DockPanel.Dock="Left" >Left Button</Button>
        <Button DockPanel.Dock="Bottom">Bottom Button</Button>
        <Button DockPanel.Dock="Right">Right Button</Button>
        <Button DockPanel.Dock="Top">Top Button</Button>
        <Button>Extra Space</Button>
    </DockPanel>
</Window>

The output of this example as follows:-

		dock panel in WPF

		Figure 1
		

Email Address

For any query you can send mail at info@techaltum.com
Thanks