-
Notifications
You must be signed in to change notification settings - Fork 324
Layout Model Control Graph
The Home page of this Wiki states that AvalonDock works with a Layout Model Tree (Layout Classes) and a Viaual Tree (Control Classes). This page explains how these trees are created initially (or re-created whenever the DockingManager's LayoutRoot property is changed.
The image below shows 2 trees, a Visual Tree (in Red) and the corresponding Layout Model tree (in Blue). The initial layout model tree can be created in the DockingManager.Layout CoerceLayoutValue()
method which is invoked when the Layout
dependency property is changed.
protected virtual void OnLayoutChanged( LayoutRoot oldLayout, LayoutRoot newLayout )
The OnLayoutChanged()
method of the DockingManager.Layout dependency property is invoked after the above CoerceLayoutValue()
method and creates each corresponding control for a Layout Model by calling the CreateUIElementForModel() method which in turn calls the appropriate control constructor and returns the new control.
LayoutRootPanel = CreateUIElementForModel( Layout.RootPanel ) as LayoutPanelControl;
This means the LayoutPanelControl(LayoutPanel model)
constructor is invoked and the model becomes a private
member of the control. The creation of the visual tree is continued when the UpdatedChildren()
method in the inherited LayoutGridControl<T> class is invoked (eg.: via OnInitialized()
). The same mechanism is invoked for the creation of the LayoutDocumentPaneControl since both classes LayoutDocumentPaneGroupControl and LayoutPanelControl are derived from the LayoutGridControl<T> class.
Summary: Layout model to control association is created via parameterized constructors in a given control class. The visual tree is then created when a control is initialized and visual children (with their layout models) are assigned to the Children properties (if the control was derived from Grid
or TabItem
).
- WinForms Demo Client
- WPF VS 2013 Demo Client
- WPF MVVM TestApp
- TestApp
- Upgrading to V4.0 or later
- Localization
- Layout Model Control Graph
- AnchorablePaneDropTarget
- AnchorablePaneTabPanel
- ContextMenuEx
- DocumentPaneDropTarget
- DocumentPaneTabPanel
- DockingManager
- DockingManagerDropTarget
- DragService
- DropDownButton
- DropDownControlArea
- DropTarget<T>
- LayoutAnchorableControl
- LayoutAnchorableFloatingWindowControl
- LayoutAnchorControl
- LayoutAnchorGroupControl
- LayoutAnchorablePaneControl
- LayoutAnchorablePaneGroupControl
- LayoutAnchorableTabItem
- LayoutAutoHideWindowControl
- AnchorablePaneTitle
- LayoutAnchorSideControl
- LayoutDocumentControl
- LayoutDocumentFloatingWindowControl
- LayoutDocumentPaneControl
- LayoutDocumentPaneGroupControl
- LayoutDocumentTabItem
- LayoutFloatingWindowControl
- LayoutGridControl<T>
- LayoutGridResizerControl
- LayoutItem
- LayoutAnchorableItem
- LayoutDocumentItem
- LayoutPanelControl
- MenuItemEx
- NavigatorWindow
- OverlayWindow
- TabControlEx
- LayoutAnchorable
- LayoutAnchorableFloatingWindow
- LayoutAnchorGroup
- LayoutAnchorablePane
- LayoutAnchorablePaneGroup
- LayoutAnchorSide
- LayoutContent
- LayoutDocument
- LayoutDocumentFloatingWindow
- LayoutDocumentPane
- LayoutDocumentPaneGroup
- LayoutElement
- LayoutFloatingWindow
- LayoutGroup
- LayoutGroupBase
- LayoutPanel
- LayoutPositionableGroup
- LayoutRoot
- IDropTarget
- ILayoutAnchorablePane
- ILayoutContainer
- ILayoutControl
- ILayoutContentSelector
- ILayoutDocumentPane
- ILayoutElement
- ILayoutElementForFloatingWindow
- ILayoutElementWithVisibility
- ILayoutGroup
- ILayoutPane
- ILayoutPanelElement
- ILayoutPaneSerializable
- ILayoutPositionableElement
- ILayoutPositionableElementWithActualSize
- ILayoutPreviousContainer
- ILayoutOrientableGroup
- ILayoutRoot
- IOverlayWindow
- IOverlayWindowArea
- IOverlayWindowDropTarget
- IOverlayWindowHost
- DropTarget
- ILayoutItem (Interface Design)
- LayoutElement
- LayoutGridControl
- LayoutItem (Class Design)
- TabContolEx (Class Design)
- Window