DockControl Class

DevZest WPF Docking

DockControl Class
Represents a control that contains multiple dockable items.
Inheritance Hierarchy
SystemObject  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            System.Windows.ControlsControl
              DevZest.Windows.DockingDockControl

Namespace: DevZest.Windows.Docking
Assembly: DevZest.WpfDocking (in DevZest.WpfDocking.dll) Version: 2.5.0.0 (2.5.5912.0)
Syntax
[ContentPropertyAttribute("DockItems")]
public class DockControl : Control
<ContentPropertyAttribute("DockItems")>
Public Class DockControl
	Inherits Control

The DockControl type exposes the following members.

Constructors
  NameDescription
Public methodDockControl
Initializes a new instance of the DockControl class.
Top
Properties
  NameDescription
Public propertyActiveDocument
Gets a value indicates currently active document DockItem. This is a dependency property.
Public propertyActiveItem
Gets a value indicates currently active DockItem. This is a dependency property.
Public propertyBottomDockTree
Gets a value indicates the bottom DockTree. This is a dependency property.
Public propertyBottomDockTreeHeight
Gets or sets the height of bottom DockTree. This is a dependency property.
Public propertyCanRedo
Gets a value that indicates whether the most recent action can be redone. This is a dependency property.
Public propertyCanUndo
Gets a value that indicates whether the most recent action can be undone. This is a dependency property.
Public propertyDefaultFloatingWindowSize
Gets or sets the default size of FloatingWindow.
Public propertyDockItems
Gets a collection of DockItem objects currently associated with this DockControl.
Public propertyDockTreeZOrder
Gets or sets the z-order of DockTree objects. This is a dependency property.
Public propertyDocumentDockTree
Gets a value indicates the document DockTree. This is a dependency property.
Public propertyDocuments
Gets a collection of DockItem objects currently displayed as document.
Public propertyFloatingWindows
Gets a collection of FloatingWindow objects currently created.
Public propertyFocusedItem
Gets a value indicates DockItem currently has keyboard focus. This is a dependency property.
Public propertyLeftDockTree
Gets a value indicates the left DockTree. This is a dependency property.
Public propertyLeftDockTreeWidth
Gets or sets the width of left DockTree. This is a dependency property.
Public propertyMaxUndoLevel
Gets or sets the maximum number of undo/redo actions. This is a dependency property.
Public propertyPanes
Gets a collection of DockPane objects currently created.
Public propertyRightDockTree
Gets a value indicates the right DockTree. This is a dependency property.
Public propertyRightDockTreeWidth
Gets or sets the width of right DockTree. This is a dependency property.
Public propertySelectedAutoHideItem
Gets a value indicates currently selected auto hide DockItem. This is a dependency property.
Public propertyTopDockTree
Gets a value indicates the top DockTree. This is a dependency property.
Public propertyTopDockTreeHeight
Gets or sets the height of top DockTree. This is a dependency property.
Public propertyUndoUnitLevel
Gets a value indicates the undo unit level.
Top
Methods
  NameDescription
Public methodBeginUndoUnit
Marks the beginning of a reversible unit of work.
Public methodClearUndo
Clears all information from the undo redo buffer.
Public methodEndUndoUnit
Marks the end of a reversible unit of work.
Public methodLoad
Loads the window layout.
Protected methodOnActiveDocumentChanged
Raises the ActiveDocumentChanged event.
Protected methodOnActiveItemChanged
Raises the ActiveItemChanged event.
Protected methodOnDockItemStateChanged
Raises the DockItemStateChanged event.
Protected methodOnDockItemStateChanging
Raises the DockItemStateChanging event.
Protected methodOnFocusedItemChanged
Raises the FocusedItemChanged event.
Protected methodOnSelectedAutoHideItemChanged
Raises the SelectedAutoHideItemChanged event.
Public methodRedo
Undoes the most recent undo command. In other words, redoes the most recent undo unit on the undo stack.
Public methodSave
Saves the current window layout.
Public methodUndo
Undoes the most recent undo command. In other words, undoes the most recent undo unit on the undo stack.
Top
Events
  NameDescription
Public eventActiveDocumentChanged
Occurs when the value of the ActiveDocument property has changed.
Public eventActiveItemChanged
Occurs when the value of the ActiveItem property has changed.
Public eventDockItemStateChanged
Occurs when the state of DockItem is changed.
Public eventDockItemStateChanging
Occurs when the state of DockItem is changing.
Public eventFocusedItemChanged
Occurs when the value of the FocusedItem property has changed.
Public eventSelectedAutoHideItemChanged
Occurs when the value of the SelectedAutoHideItemChanged property has changed.
Top
Fields
  NameDescription
Public fieldStatic memberActiveDocumentProperty
Identifies the ActiveDocument dependency property.
Public fieldStatic memberActiveItemProperty
Identifies the ActiveItem dependency property.
Public fieldStatic memberBottomDockTreeHeightProperty
Identifies the BottomDockTreeHeight dependency property.
Public fieldStatic memberBottomDockTreeProperty
Identifies the BottomDockTree dependency property.
Public fieldStatic memberCanRedoProperty
Identifies the CanRedo dependency property.
Public fieldStatic memberCanUndoProperty
Identifies the CanUndo dependency property.
Public fieldStatic memberDefaultFloatingWindowSizeProperty
Identifies the DefaultFloatingWindowSize dependency property.
Public fieldStatic memberDockTreeZOrderProperty
Identifies the DockTreeZOrder dependency property.
Public fieldStatic memberDocumentDockTreeProperty
Identifies the DocumentDockTree dependency property.
Public fieldStatic memberFocusedItemProperty
Identifies the FocusedItem dependency property.
Public fieldStatic memberLeftDockTreeProperty
Identifies the LeftDockTree dependency property.
Public fieldStatic memberLeftDockTreeWidthProperty
Identifies the LeftDockTreeWidth dependency property.
Public fieldStatic memberMaxUndoLevelProperty
Identifies the MaxUndoLevel dependency property.
Public fieldStatic memberRightDockTreeProperty
Identifies the RightDockTree dependency property.
Public fieldStatic memberRightDockTreeWidthProperty
Identifies the RightDockTreeWidth dependency property.
Public fieldStatic memberSelectedAutoHideItemProperty
Identifies the SelectedAutoHideItem dependency property.
Public fieldStatic memberTopDockTreeHeightProperty
Identifies the TopDockTreeHeight dependency property.
Public fieldStatic memberTopDockTreeProperty
Identifies the TopDockTree dependency property.
Top
Remarks

DockControl is the center of WPF docking library. It provides the following key services:

By default DockControl also uses following services that you can customize through the provided attached properties:

ServiceAttached Properties
AutoHideAnimation, AnimationDuration.
DockManagerDefaultFloatingPreviewSize, FloatingWindowStrategy.
DocumentTabShowsIcon.
WindowSwitcherHotkey

Examples
XAML
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:dz="http://schemas.devzest.com/presentation/docking"
    Title="DockControl Sample"
    WindowState="Maximized">
    <dz:DockControl>
        <dz:DockItem TabText="Welcome" Title="Welcome" ShowAction="{dz:ShowAsDockPositionAction DockPosition=Document}">
            <FlowDocumentScrollViewer>
                <FlowDocumentScrollViewer.Document>
                    <FlowDocument FontFamily="Calibri" FontSize="14.5" TextAlignment="Left">
                        <Paragraph FontSize="22" FontWeight="Bold">Welcome to DevZest Docking</Paragraph>
                    </FlowDocument>
                </FlowDocumentScrollViewer.Document>
            </FlowDocumentScrollViewer>
        </dz:DockItem>
        <dz:DockItem TabText="Saved State" Title="Saved State" ShowAction="{dz:ShowAsDockPositionAction DockPosition=Bottom}">
            <TextBox />
        </dz:DockItem>
        <dz:DockItem TabText="Output" Title="Output" ShowAction="{dz:ShowAsDockPositionAction DockPosition=Bottom}">
            <TextBox />
        </dz:DockItem>
        <dz:DockItem TabText="Solution Explorer" Title="Solution Explorer" ShowAction="{dz:ShowAsDockPositionAction DockPosition=Right}">
            <TextBox />
        </dz:DockItem>
        <dz:DockItem TabText="Properties" Title="Properties" ShowAction="{dz:ShowAsDockPositionAction DockPosition=Right}">
            <TextBox />
        </dz:DockItem>
    </dz:DockControl>
</Window>
See Also