AvalonDock is a opensouced Dock Manager libraries under CodePlex project.
The current version of AvalonDock is on the version 2.0;
and the blurb that you can find from the AvalonDock is something like this:
AvalonDock is a docking windows control for WPF that lets you create customizable layouts using a full featured window docking system similar to what is found in many popular integrated development environements (IDEs) such as Visual Studio. It includes themes and samples to get you started.Onething that is lacking on the current AvalonDock is that it does not have very good documentation.
the following are two examples that you can find from the Avalon Documentaion.
1. LayoutAnchorable and LayoutAnchorablePane
<avalonDock:DockingManager x:Name="dockingManager"> <avalonDock:LayoutRoot> <avalonDock:LayoutPanel Orientation="Horizontal"> <avalonDock:LayoutAnchorablePane DockWidth="150"> <avalonDock:LayoutAnchorable Title="Sample Tool Pane"> <TextBlock /> </avalonDock:LayoutAnchorable> </avalonDock:LayoutAnchorablePane> </avalonDock:LayoutPanel> <avalonDock:LayoutRoot.LeftSide> <avalonDock:LayoutAnchorSide> <avalonDock:LayoutAnchorGroup> <avalonDock:LayoutAnchorable Title="Autohidden Content"> <TextBlock /> </avalonDock:LayoutAnchorable> </avalonDock:LayoutAnchorGroup> </avalonDock:LayoutAnchorSide> </avalonDock:LayoutRoot.LeftSide> </avalonDock:LayoutRoot> </avalonDock:DockingManager>And don't forget to include the following namespace.
xmlns:avalonDock="http://schemas.xceed.com/wpf/xaml/avalondock"
the captured screenshot is as follow.
2. examples on LayoutDocumentGroup and LayoutAnchorableGroup
<avalonDock:DockingManager x:Name="dockingManager"> <avalonDock:LayoutRoot> <avalonDock:LayoutPanel Orientation="Horizontal"> <avalonDock:LayoutDocumentPaneGroup> <avalonDock:LayoutDocumentPane> <avalonDock:LayoutDocument Title="Doc1"> <TextBlock /> </avalonDock:LayoutDocument> <avalonDock:LayoutDocument Title="Doc2"> <TextBlock /> </avalonDock:LayoutDocument> <avalonDock:LayoutDocument Title="Doc3"> <TextBlock /> </avalonDock:LayoutDocument> </avalonDock:LayoutDocumentPane> </avalonDock:LayoutDocumentPaneGroup> <avalonDock:LayoutAnchorablePaneGroup DockHeight="150"> <avalonDock:LayoutAnchorablePane> <avalonDock:LayoutAnchorable Title="Tool 1"> <TextBlock /> </avalonDock:LayoutAnchorable> <avalonDock:LayoutAnchorable Title="Tool 2"> <TextBlock /> </avalonDock:LayoutAnchorable> <avalonDock:LayoutAnchorable Title="Tool 3"> <TextBlock /> </avalonDock:LayoutAnchorable> <avalonDock:LayoutAnchorable Title="Tool 4"> <TextBlock /> </avalonDock:LayoutAnchorable> </avalonDock:LayoutAnchorablePane> </avalonDock:LayoutAnchorablePaneGroup> </avalonDock:LayoutPanel> <avalonDock:LayoutRoot.LeftSide> <avalonDock:LayoutAnchorSide> <avalonDock:LayoutAnchorGroup> <avalonDock:LayoutAnchorable Title="Autohidden Content"> <TextBlock /> </avalonDock:LayoutAnchorable> </avalonDock:LayoutAnchorGroup> </avalonDock:LayoutAnchorSide> </avalonDock:LayoutRoot.LeftSide> </avalonDock:LayoutRoot> </avalonDock:DockingManager>
Well, it isi still primitive in that to support Styling on Datatemplate, one example is that you cannot apply things like LayotDocument as the containing elements like Border, to further nest business logic elements. e.g.
If you have an DockManager declaration as follow.
<avalonDock:DockingManager Grid.Row="1" Grid.ColumnSpan="6" x:Name="dockManager" DocumentsSource="{Binding Documents}" > <!-- Temporarily disable the Behavior for the Behavior --> <!--<i:Interaction.Behaviors> <behaviors:DockLayoutManagerBehaviour Layout="{Binding LayoutXml, Mode=TwoWay}"/> </i:Interaction.Behaviors>--> <avalonDock:LayoutRoot> <avalonDock:LayoutPanel> <avalonDock:LayoutDocumentPaneGroup > </avalonDock:LayoutDocumentPaneGroup> </avalonDock:LayoutPanel> </avalonDock:LayoutRoot> </avalonDock:DockingManager>while if you try to re-datatemplatize some DataType, you will find that avalonDock:LayoutDocument and avalonDock:LayoutDocumentPane cannot be used as the containing element ..
<DataTemplate xmlns:vm="clr-namespace:RiskLayoutExample.ViewModels" DataType="{x:Type vm:RiskDataViewModel}" > <avalonDock:LayoutDocument> <Border ...> </avalonDock:LayoutDocument> </DataTemplate>you might get an compiler error saying...
"Error 1 The root of a Template content section cannot contain an element of type 'Xceed.Wpf.AvalonDock.Layout.LayoutDocument'. Only FrameworkElement and FrameworkContentElement types are valid. Line 93 Position 10. C:\dev\RiskViewer\Dx-12.1-Simplified\LayoutManager\RiskLayoutExample\Views\DataTemplates\SomeContectDataTemplate.xaml 93 10 RiskLayoutExample"
References:
AvalonDock