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 the ActiveContent property has changed.
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 ContextMenu to show on an anchorable.
AnchorableHeaderTemplate Gets/sets the DataTemplate to use for a header of an anchorable.
AnchorableHeaderTemplateSelector Gets/sets the DataTemplateSelector to use for selecting the DataTemplate for the header of an anchorable.
AnchorablePaneControlStyle Gets/sets the Style to apply to LayoutAnchorablePaneControl.
AnchorablePaneTemplate Gets/sets the ControlTemplate used to render LayoutAnchorablePaneControl.
AnchorablesSource Gets/sets the source collection for all LayoutAnchorable objects managed in this framework.
AnchorableTitleTemplate Gets/sets the DataTemplate to use for the title of an anchorable.
AnchorableTitleTemplateSelector Gets/sets the DataTemplateSelector to use when selecting a DataTemplate for the title of an anchorable.

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 LayoutAnchorSideControl that is displayed as left side panel control.
RightSidePanel Gets/sets the LayoutAnchorSideControl that is displayed as right side panel control.
TopSidePanel Gets/sets the LayoutAnchorSideControl that is displayed as top side panel control.
BottomSidePanel Gets/sets the LayoutAnchorSideControl that is displayed as bottpm side panel control.

See also: DockingManagerDropTarget

Document Properties

Property Description
DocumentContextMenu Gets/sets the ContextMenu to show for a document.
DocumentHeaderTemplate Gets/sets the DataTemplate to use for document headers.
DocumentHeaderTemplateSelector Gets/sets the DataTemplateSelector that can be used for selecting a DataTemplates for a document header.
DocumentPaneControlStyle Gets/sets the Style of LayoutDocumentPaneControl.
DocumentPaneMenuItemHeaderTemplate Gets/sets the DataTemplate for the header to display menu dropdown items on a document pane.
DocumentPaneMenuItemHeaderTemplateSelector Gets/sets the DataTemplateSelector to select a DataTemplate for the menu items shown when user selects the LayoutDocumentPaneControl context menu switch.
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 DataTemplate to use for displaying the title of a document.
DocumentTitleTemplateSelector Gets/sets the DataTemplateSelector to use for displaying the DataTemplate of a document's title.

Layout Properties

Property Description
LayoutRoot Layout Gets/sets the root of the layout tree.
LayoutItemContainerStyle Gets/sets the Style to apply to a LayoutDocumentItem object.
LayoutItemContainerStyleSelector Gets/sets the StyleSelector to select the Style for a LayoutDocumentItem.
LayoutItemTemplate Gets/sets the DataTemplate used to render anchorable and document content.
LayoutItemTemplateSelector Gets/sets the DataTemplateSelector to select a DataTemplate of an anchorable.
LayoutRootPanel Gets/sets the layout LayoutPanelControl 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 content that is currently active (document,anchoreable, or null).
AllowMixedOrientation Gets/sets whether the DockingManager should allow mixed orientation for document panes.
AutoHideWindow Gets the LayoutAutoHideWindowControl that is currently shown as 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 Enumerates all LayoutFloatingWindowControls managed by this framework.
GridSplitterHeight Gets/sets the height of a grid splitter.
GridSplitterWidth Gets/sets the width of grid splitters.
IconContentTemplate Gets/sets the DataTemplate to use on the icon extracted from the layout model.
IconContentTemplateSelector Gets/sets the DataTemplateSelector to select a DataTemplate for a content icon.
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 be used for the controls in this framework.

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