Skip to content

DockingManager

Dirkster99 edited this page Feb 6, 2020 · 68 revisions

The DockingManager is the root of the visual tree and is the core control of AvalonDock. It contains core dependency properties, events, and methods to customize many aspects of the docking framework.

Public Dependency Properties:

and Events and Methods

Events

Event Description
ActiveContentChanged Raised when ActiveContent changes.
DocumentClosed Raised after a document is closed.
DocumentClosing Raised when a document is about to be closed.
LayoutChanged Raised when Layout changes. See also OnLayoutChanged.
LayoutChanging Raised when Layout is about to be changed.

Anchorable Properties

Property Description
AnchorableContextMenu Gets or sets the context menu to display for anchorables.
AnchorableHeaderTemplate Gets or sets the data template to use for the headers of anchorables.
AnchorableHeaderTemplateSelector Gets or sets the selector to use when selecting the data template for the headers of anchorables.
AnchorablePaneControlStyle Gets or sets the style to apply to LayoutAnchorablePaneControl.
AnchorablePaneTemplate Gets or sets the ControlTemplate used to render LayoutAnchorablePaneControl.
AnchorablesSource Gets or sets the source collection of LayoutAnchorable objects.
AnchorableTitleTemplate Gets or sets the data template to use for anchorable titles.
AnchorableTitleTemplateSelector Gets or sets the selector to use when selecting the data template for anchorable titles.

Anchor Properties

Property Description
AnchorGroupTemplate Gets or sets the ControlTemplate used to render the LayoutAnchorGroupControl.
AnchorSideTemplate Gets or sets the ControlTemplate used to render LayoutAnchorSideControl.
AnchorTemplate Gets or sets the ControlTemplate used to render LayoutAnchorControl.

Side Panel Properties

Property Description
LeftSidePanel Gets or sets the left side panel control.
RightSidePanel Gets or sets the right side panel control.
TopSidePanel Gets or sets the top side panel control.
BottomSidePanel Gets or sets the bottom side panel control.

See also: DockingManagerDropTarget

Document Properties

Property Description
DocumentContextMenu Gets or sets the context menu to show for documents.
DocumentHeaderTemplate Gets or sets the data template to use for document headers.
DocumentHeaderTemplateSelector Gets or sets the template selector that is used when selecting the data template for document headers.
DocumentPaneControlStyle Gets or sets the style of LayoutDocumentPaneControl.
DocumentPaneMenuItemHeaderTemplate Gets or sets the DataTemplate to use when creating menu items in dropdowns on document panes.
DocumentPaneMenuItemHeaderTemplateSelector Gets or sets the data template selector to use for the menu items shown when the user selects the LayoutDocumentPaneControl's document switch context menu.
DocumentPaneTemplate Gets or sets the ControlTemplate used to render LayoutDocumentPaneControl.
DocumentsSource Gets or sets the source collection of LayoutDocument objects.
DocumentTitleTemplate Gets or sets the data template to use for document titles.
DocumentTitleTemplateSelector Gets or sets the data template selector to use when creating the data template for the title.

Layout Properties

Property Description
LayoutRoot Layout Gets or sets the root of the layout tree.
LayoutItemContainerStyle Gets or sets the style to apply to LayoutDocumentItem objects.
LayoutItemContainerStyleSelector Gets or sets the style selector of LayoutDocumentItemStyle.
LayoutItemTemplate Gets or sets the template used to render anchorable and document content.
LayoutItemTemplateSelector Gets or sets the template selector to use for anchorable and document templates.
LayoutRootPanel Gets or sets the layout panel control which is attached to the Layout.Root property.
LayoutUpdateStrategy Gets or sets the strategy class to call when AvalonDock needs to position an anchorable inside an existing layout model.

Other Properties

Property Description
ActiveContent Gets or sets the currently active content.
AllowMixedOrientation Gets or sets whether the docking manager should allow mixed orientation for document panes.
AutoHideWindow Gets the currently shown autohide window.
AutoHideDelay Gets/sets the wait time in milliseconds that is applicable when the is about to hide the autohide window back into its anchor representation into one of the side panels (top, bottom, left, or right). Recommended configuration value range should be between 0 and 1500 milliseconds.
FloatingWindows Gets the floating windows.
GridSplitterHeight Gets or sets the height of grid splitters.
GridSplitterWidth Gets or sets the width of grid splitters.
IconContentTemplate Gets or sets the data template to use on the icon extracted from the layout model.
IconContentTemplateSelector Gets or sets the data template selector to use when selecting the data template for content icons.
ShowSystemMenu Gets or sets whether floating windows should show the system menu when a custom context menu is not defined.
Theme Gets or sets the theme to use for AvalonDock controls.

Visual Root Properties

Property Description
LayoutPanelControl LayoutRootPanel Gets or sets the layout panel control which is attached to the Layout.Root property.
LayoutAnchorSideControl LeftSidePanel Gets or sets the left side panel control.
LayoutAnchorSideControl RightSidePanel Gets or sets the right side panel control.
LayoutAnchorSideControl TopSidePanel Gets or sets the top side panel control.
LayoutAnchorSideControl BottomSidePanel Gets or sets the bottom side panel control.
LayoutAutoHideWindowControl AutoHideWindow Gets the currently shown autohide window.

The above properties implement the controls that are part of the root of the Visual Tree. The LayoutRoot Layout implements the root of the Layout Tree which implements the layout models for the root of the visual tree.

Methods

Public Methods

GetLayoutItemFromModel

  • LayoutItem GetLayoutItemFromModel( LayoutContent content )

OnApplyTemplate

  • Overridden. Is invoked whenever application code or internal processes call ApplyTemplate, setting up AutoHideWindow.

CreateFloatingWindow

Internal Methods

CreateUIElementForModel

  • UIElement CreateUIElementForModel( ILayoutElement model )
    • This method is invoked to create the actual visible UI element from a given layout model. It is invoked when:
  1. New UI items are created and layed out or
  2. Layout is deserialized, and the previous UI items are restored to the screen (using the model whos information was serialized to XML).

StartDraggingFloatingWindowForContent

Executes when the user starts to drag a Document or LayoutAnchorable by dragging its title.

internal void StartDraggingFloatingWindowForContent( LayoutContent contentModel, bool startDrag = true )

Called by:

Document

Anchorable

StartDraggingFloatingWindowForPane

Executes when the user starts to drag a LayoutAnchorable by dragging its pane. The pane is not the same as the title since a layoutanchorable can have a horizontal bar on top (the pane) and a TabItem (Title) at the bottom, and both elements are dragable.

internal void StartDraggingFloatingWindowForPane( LayoutAnchorablePane paneModel )

Called by:

Demo Projects

Controls

Layout Models

Interfaces

Class Designs

Bugs

Manual Tests

Clone this wiki locally