AvalonDock 2.0 allows to create an interface for WPF very similar to Visual Studio GUI. It's important to understand that has been developed with this in mind so it's most suited for projects that have documents and tools.
In this tutorial I'll show you how to start using with AvalonDock. Below information are relative to version 2.0 and connot be valid for earlier versions.
AvalonDock is composed of a layout model, a series of controls representing the views and a DockingManager class which reppresents the docking area where user can drag and drop documents and tools.
To start create a new .NET 4/.NET 4.5 solution and add a reference to AvalonDock.dll (directly or using NuGet). Then add the AD namespace to the MainWindow.xaml.
Under the root grid place the DockingManager and a sample layout:
<Window x:Class="MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:avalonDock="http://avalondock.codeplex.com"
Title="MainWindow" Height="434" Width="684">
<Grid>
<avalonDock:DockingManager x:Name="dockingManager">
<avalonDock:LayoutRoot>
<avalonDock:LayoutPanel Orientation="Horizontal">
<avalonDock:LayoutDocumentPane/>
<avalonDock:LayoutAnchorablePane DockWidth="150">
<avalonDock:LayoutAnchorable Title="Sample Tool Pane">
<TextBox/>
</avalonDock:LayoutAnchorable>
</avalonDock:LayoutAnchorablePane>
</avalonDock:LayoutPanel>
</avalonDock:LayoutRoot>
</avalonDock:DockingManager>
</Grid>
</Window>
The DockingManager class is the core of AvalonDock. It's responsible to create and manage the layout. The layout is defined as a tree of ILayoutElement objects. The root is represented by the LayoutRoot class which is composed by four foundamental children:
1) The root panel accessible thru the Root property points to the main LayoutPanel.