Skip to content

DockingManager

Dirkster99 edited this page Jul 7, 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/sets the context menu to display for anchorables.
AnchorableHeaderTemplate Gets/sets the data template to use for the headers of anchorables.
AnchorableHeaderTemplateSelector Gets/sets the selector to use when selecting the data template for the headers of anchorables.
AnchorablePaneControlStyle Gets/sets the Style to apply to LayoutAnchorablePaneControl.
AnchorablePaneTemplate Gets/sets the ControlTemplate used to render LayoutAnchorablePaneControl.
AnchorablesSource Gets/sets the source collection of LayoutAnchorable objects.
AnchorableTitleTemplate Gets/sets the data template to use for anchorable titles.
AnchorableTitleTemplateSelector Gets/sets the selector to use when selecting the data template for anchorable titles.

Anchor Properties

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

Side Panel Properties

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

See also: DockingManagerDropTarget

Document Properties

Property Description
DocumentContextMenu Gets/sets the context menu to show for documents.
DocumentHeaderTemplate Gets/sets the data template to use for document headers.
DocumentHeaderTemplateSelector Gets/sets the template selector that is used when selecting the data template for document headers.
DocumentPaneControlStyle Gets/sets the Style of LayoutDocumentPaneControl.
DocumentPaneMenuItemHeaderTemplate Gets/sets the DataTemplate to use when creating menu items in dropdowns on document panes.
DocumentPaneMenuItemHeaderTemplateSelector Gets/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/sets the ControlTemplate that can be used to render the LayoutDocumentPaneControl.
DocumentsSource Gets/sets the source collection of LayoutDocument objects.
DocumentTitleTemplate Gets/sets the data template to use for document titles.
DocumentTitleTemplateSelector Gets/sets the data template selector to use when creating the data template for the title.

Layout Properties

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

Other Properties

Property Description
ActiveContent Gets/sets the currently active content.
AllowMixedOrientation Gets/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.
AutoWindowSizeWhenOpened Gets/sets whether the floating window size of a LayoutFloatingWindowControl is auto sized when it is dragged out.
FloatingWindows Gets the floating windows.
GridSplitterHeight Gets/sets the height of grid splitters.
GridSplitterWidth Gets/sets the width of grid splitters.
IconContentTemplate Gets/sets the data template to use on the icon extracted from the layout model.
IconContentTemplateSelector Gets/sets the data template selector to use when selecting the data template for content icons.
IsVirtualizingAnchorable Gets/sets (a simple non-dependency property) to determine whether the LayoutAnchorablePaneControl is virtualizing its tabbed item child controls or not.
IsVirtualizingDocument Gets/sets (a simple non-dependency property) to determine whether the LayoutDocumentPaneControl is virtualizing its tabbed item child controls or not.
ShowSystemMenu Gets/sets whether floating windows should show the system menu when a custom context menu is not defined.
Theme Gets/sets the theme to use for AvalonDock controls.

Visual Root Properties

Property Description
LayoutPanelControl LayoutRootPanel Gets/sets the layout panel control which is attached to the Layout.Root property.
LayoutAnchorSideControl LeftSidePanel Gets/sets the left side panel control.
LayoutAnchorSideControl RightSidePanel Gets/sets the right side panel control.
LayoutAnchorSideControl TopSidePanel Gets/sets the top side panel control.
LayoutAnchorSideControl BottomSidePanel Gets/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