

'Declaration<ContentPropertyAttribute("Layout")> <TemplatePartAttribute("PART_AutoHideArea")> <StyleTypedPropertyAttribute(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)> <XmlLangPropertyAttribute("Language")> <UsableDuringInitializationAttribute(True)> <RuntimeNamePropertyAttribute("Name")> <UidPropertyAttribute("Uid")> <TypeDescriptionProviderAttribute(MS.Internal.ComponentModel.DependencyObjectProvider)> <NameScopePropertyAttribute("NameScope", System.Windows.NameScope)> Public Class DockingManager Inherits System.Windows.Controls.Control
'UsageDim instance As DockingManager
[ContentProperty("Layout")] [TemplatePart("PART_AutoHideArea")] [StyleTypedProperty(Property="FocusVisualStyle", StyleTargetType=System.Windows.Controls.Control)] [XmlLangProperty("Language")] [UsableDuringInitialization(true)] [RuntimeNameProperty("Name")] [UidProperty("Uid")] [TypeDescriptionProvider(MS.Internal.ComponentModel.DependencyObjectProvider)] [NameScopeProperty("NameScope", System.Windows.NameScope)] public class DockingManager : System.Windows.Controls.Control
AvalonDock provides a system that allow developers to create customizable layouts using a window docking system similar to what is found in many popular integrated development environements (IDEs).
The DockingManager class is the core control of AvalonDock. Its Layout property contains the layout composition that is represented by the classes in the Xceed.Wpf.AvalonDock.Layout namespace. The class arranges the panes it contains and also handles auto-hide panes and floating windows (panes in turn contain, directly or indirectly, the two types of "content" elements, namely, LayoutAnchorable and LayoutDocument elements). The DockingManager class also handles saving and restoring layouts.
The class provides several "Template" properties (e.g., AnchorableTitleTemplate/DocumentTitleTemplate, AnchorableHeaderTemplate/DocumentHeaderTemplate, etc.) that allow designers and developers to specify the template for the elements contained in the layout.
AvalonDock adheres to an MVVM design.
The Model is represented by the classes contained in the Xceed.Wpf.AvalonDock.Layout namespace. The classes in this namespace are the layout elements in a layout model (for example LayoutAnchorable/LayoutDocument, LayoutAnchorablePane/LayoutDocumentPane, LayoutAnchorablePaneGroup/LayoutDocumentPaneGroup, etc.) that are used directly in XAML within a DockingManager to describe how the layout is composed.
The View is represented by the classes contained in the Xceed.Wpf.AvalonDock.Controls namespace; these classes are a set of stylizable controls that show the user controls. The names of the view controls typically end with "Control" (for example, LayoutAnchorableControl is the view control, whereas LayoutAnchorable is the model element).
The DockingManager uses various classes (such as the LayoutItem and its derived classes) to perform the role of the ViewModel, preparing the model to be consumed by the view.
There is one and only one logical tree, which has the DockingManager as its root. Even if a control is placed in a different window (i.e., autohidden windows or floating windows), it always belong to the same logical tree below the DockingManager.
<local:DemoView x:Class="LiveExplorer.Samples.AvalonDock.Views.AvalonDockView" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:LiveExplorer" xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" xmlns:xcad="http://schemas.xceed.com/wpf/xaml/avalondock" xmlns:s="clr-namespace:System;assembly=mscorlib"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <StackPanel Orientation="Horizontal" Margin="0,0,0,10"> <TextBlock Text="Theme:" Margin="0,0,10,0" VerticalAlignment="Center"/> <ComboBox x:Name="_themeCombo" SelectedIndex="0" Width="200"> <ComboBoxItem Content="Generic" /> <ComboBoxItem Content="Aero"> <ComboBoxItem.Tag> <xcad:AeroTheme /> </ComboBoxItem.Tag> </ComboBoxItem> <ComboBoxItem Content="VS2010"> <ComboBoxItem.Tag> <xcad:VS2010Theme /> </ComboBoxItem.Tag> </ComboBoxItem> <ComboBoxItem Content="Metro"> <ComboBoxItem.Tag> <xcad:MetroTheme /> </ComboBoxItem.Tag> </ComboBoxItem> </ComboBox> </StackPanel> <xcad:DockingManager Grid.Row="1" MaxHeight="425" AllowMixedOrientation="True" BorderBrush="Black" BorderThickness="1" Theme="{Binding ElementName=_themeCombo, Path=SelectedItem.Tag}"> <xcad:DockingManager.DocumentHeaderTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <Image Source="{Binding IconSource}" Margin="0,0,4,0"/> <TextBlock Text="{Binding Title}" /> </StackPanel> </DataTemplate> </xcad:DockingManager.DocumentHeaderTemplate> <xcad:LayoutRoot x:Name="_layoutRoot"> <xcad:LayoutPanel Orientation="Horizontal"> <xcad:LayoutAnchorablePane DockWidth="200"> <xcad:LayoutAnchorable ContentId="properties" Title="Properties" CanHide="False" CanClose="False" AutoHideWidth="240" IconSource="../Images/property-blue.png"> <xctk:PropertyGrid NameColumnWidth="110" SelectedObject="{Binding ElementName=_layoutRoot, Path=LastFocusedDocument.Content}"/> </xcad:LayoutAnchorable> </xcad:LayoutAnchorablePane> <xcad:LayoutDocumentPaneGroup > <xcad:LayoutDocumentPane> <xcad:LayoutDocument ContentId="document1" Title="Document 1" IconSource="../Images/document.png" > <Button Content="Document 1 Content" HorizontalAlignment="Center" VerticalAlignment="Center"/> </xcad:LayoutDocument> <xcad:LayoutDocument ContentId="document2" Title="Document 2" IconSource="../Images/document.png"> <TextBox Text="Document 2 Content" AcceptsReturn="True"/> </xcad:LayoutDocument> </xcad:LayoutDocumentPane> </xcad:LayoutDocumentPaneGroup > <xcad:LayoutAnchorablePaneGroup DockWidth="125"> <xcad:LayoutAnchorablePane> <xcad:LayoutAnchorable ContentId="alarms" Title="Alarms" IconSource="../Images/alarm-clock-blue.png" > <ListBox> <s:String>Alarm 1</s:String> <s:String>Alarm 2</s:String> <s:String>Alarm 3</s:String> </ListBox> </xcad:LayoutAnchorable> <xcad:LayoutAnchorable ContentId="journal" Title="Journal" > <RichTextBox> <FlowDocument> <Paragraph FontSize="14" FontFamily="Segoe"> This is the content of the Journal Pane. <LineBreak/> A <Bold>RichTextBox</Bold> has been added here </Paragraph> </FlowDocument> </RichTextBox> </xcad:LayoutAnchorable> </xcad:LayoutAnchorablePane> </xcad:LayoutAnchorablePaneGroup> </xcad:LayoutPanel> <xcad:LayoutRoot.LeftSide> <xcad:LayoutAnchorSide> <xcad:LayoutAnchorGroup> <xcad:LayoutAnchorable Title="Agenda" ContentId="agenda" IconSource="../Images/address-book-open.png"> <TextBlock Text="Agenda Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/> </xcad:LayoutAnchorable> <xcad:LayoutAnchorable Title="Contacts" ContentId="contacts" IconSource="../Images/address-book--pencil.png" > <TextBlock Text="Contacts Content" Margin="10" FontSize="18" FontWeight="Black" TextWrapping="Wrap"/> </xcad:LayoutAnchorable> </xcad:LayoutAnchorGroup> </xcad:LayoutAnchorSide> </xcad:LayoutRoot.LeftSide> </xcad:LayoutRoot> </xcad:DockingManager> </Grid> </local:DemoView>
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
Xceed.Wpf.AvalonDock.DockingManager
| Name | Description | |
|---|---|---|
![]() | DockingManager Constructor | Initializes a new instance of the DockingManager class. |
| Name | Description | |
|---|---|---|
![]() | FindLogicalAncestor<T> | Finds the logical ancenster |
![]() | FindLogicalAncestorsAndSelf | |
![]() | FindLogicalChildren<T> | Find the logical children. |
![]() | FindVisualAncestor<T> | Finds the visual ancestor. |
![]() | FindVisualChildren<T> | Finds the visual children. |
![]() | FindVisualTreeRoot | Finds the visual tree root. |
![]() | ShowDialog | Overloaded. |
.NET: net5.0, net5.0-windows, net6.0, net6.0-macos, net6.0-windows, net7.0, net7.0-macos, net7.0-windows, net8.0, net8.0-browser, net8.0-macos, net8.0-windows, net9.0, net9.0-browser, net9.0-macos, net9.0-windows, net10.0, net10.0-browser, net10.0-macos, net10.0-windows.
.NET Framework: net40, net403, net45, net451, net452, net46, net461, net462, net463, net47, net471, net472, net48, net481.