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
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
The DockControl type exposes the following members.
Constructors
Name | Description | |
---|---|---|
DockControl | Initializes a new instance of the DockControl class. |
Properties
Name | Description | |
---|---|---|
ActiveDocument | Gets a value indicates currently active document DockItem. This is a dependency property. | |
ActiveItem | Gets a value indicates currently active DockItem. This is a dependency property. | |
BottomDockTree | Gets a value indicates the bottom DockTree. This is a dependency property. | |
BottomDockTreeHeight | Gets or sets the height of bottom DockTree. This is a dependency property. | |
CanRedo | Gets a value that indicates whether the most recent action can be redone. This is a dependency property. | |
CanUndo | Gets a value that indicates whether the most recent action can be undone. This is a dependency property. | |
DefaultFloatingWindowSize | Gets or sets the default size of FloatingWindow. | |
DockItems | Gets a collection of DockItem objects currently associated with this DockControl. | |
DockTreeZOrder | Gets or sets the z-order of DockTree objects. This is a dependency property. | |
DocumentDockTree | Gets a value indicates the document DockTree. This is a dependency property. | |
Documents | Gets a collection of DockItem objects currently displayed as document. | |
FloatingWindows | Gets a collection of FloatingWindow objects currently created. | |
FocusedItem | Gets a value indicates DockItem currently has keyboard focus. This is a dependency property. | |
LeftDockTree | Gets a value indicates the left DockTree. This is a dependency property. | |
LeftDockTreeWidth | Gets or sets the width of left DockTree. This is a dependency property. | |
MaxUndoLevel | Gets or sets the maximum number of undo/redo actions. This is a dependency property. | |
Panes | Gets a collection of DockPane objects currently created. | |
RightDockTree | Gets a value indicates the right DockTree. This is a dependency property. | |
RightDockTreeWidth | Gets or sets the width of right DockTree. This is a dependency property. | |
SelectedAutoHideItem | Gets a value indicates currently selected auto hide DockItem. This is a dependency property. | |
TopDockTree | Gets a value indicates the top DockTree. This is a dependency property. | |
TopDockTreeHeight | Gets or sets the height of top DockTree. This is a dependency property. | |
UndoUnitLevel | Gets a value indicates the undo unit level. |
Methods
Name | Description | |
---|---|---|
BeginUndoUnit | Marks the beginning of a reversible unit of work. | |
ClearUndo | Clears all information from the undo redo buffer. | |
EndUndoUnit | Marks the end of a reversible unit of work. | |
Load | Loads the window layout. | |
OnActiveDocumentChanged | Raises the ActiveDocumentChanged event. | |
OnActiveItemChanged | Raises the ActiveItemChanged event. | |
OnDockItemStateChanged | Raises the DockItemStateChanged event. | |
OnDockItemStateChanging | Raises the DockItemStateChanging event. | |
OnFocusedItemChanged | Raises the FocusedItemChanged event. | |
OnSelectedAutoHideItemChanged | Raises the SelectedAutoHideItemChanged event. | |
Redo | Undoes the most recent undo command. In other words, redoes the most recent undo unit on the undo stack. | |
Save | Saves the current window layout. | |
Undo | Undoes the most recent undo command. In other words, undoes the most recent undo unit on the undo stack. |
Events
Name | Description | |
---|---|---|
ActiveDocumentChanged | Occurs when the value of the ActiveDocument property has changed. | |
ActiveItemChanged | Occurs when the value of the ActiveItem property has changed. | |
DockItemStateChanged | Occurs when the state of DockItem is changed. | |
DockItemStateChanging | Occurs when the state of DockItem is changing. | |
FocusedItemChanged | Occurs when the value of the FocusedItem property has changed. | |
SelectedAutoHideItemChanged | Occurs when the value of the SelectedAutoHideItemChanged property has changed. |
Fields
Name | Description | |
---|---|---|
ActiveDocumentProperty | Identifies the ActiveDocument dependency property. | |
ActiveItemProperty | Identifies the ActiveItem dependency property. | |
BottomDockTreeHeightProperty | Identifies the BottomDockTreeHeight dependency property. | |
BottomDockTreeProperty | Identifies the BottomDockTree dependency property. | |
CanRedoProperty | Identifies the CanRedo dependency property. | |
CanUndoProperty | Identifies the CanUndo dependency property. | |
DefaultFloatingWindowSizeProperty | Identifies the DefaultFloatingWindowSize dependency property. | |
DockTreeZOrderProperty | Identifies the DockTreeZOrder dependency property. | |
DocumentDockTreeProperty | Identifies the DocumentDockTree dependency property. | |
FocusedItemProperty | Identifies the FocusedItem dependency property. | |
LeftDockTreeProperty | Identifies the LeftDockTree dependency property. | |
LeftDockTreeWidthProperty | Identifies the LeftDockTreeWidth dependency property. | |
MaxUndoLevelProperty | Identifies the MaxUndoLevel dependency property. | |
RightDockTreeProperty | Identifies the RightDockTree dependency property. | |
RightDockTreeWidthProperty | Identifies the RightDockTreeWidth dependency property. | |
SelectedAutoHideItemProperty | Identifies the SelectedAutoHideItem dependency property. | |
TopDockTreeHeightProperty | Identifies the TopDockTreeHeight dependency property. | |
TopDockTreeProperty | Identifies the TopDockTree dependency property. |
Remarks
DockControl is the center of WPF docking library. It provides the following key services:
Service | Properties and Methods |
---|---|
DockItem Management | DockItems, Documents, FocusedItem, ActiveItem, ActiveDocument, SelectedAutoHideItem |
DockTree Management | LeftDockTree, RightDockTree, TopDockTree, BottomDockTree, DocumentDockTree, LeftDockTreeWidth, RightDockTreeWidth, TopDockTreeHeight, BottomDockTreeHeight, DockTreeZOrder |
Floating Window Management | FloatingWindows, DefaultFloatingWindowSize |
Save/Load | Save, Load(DockLayout, FuncObject, DockItem) |
Undo/Redo | MaxUndoLevel, CanUndo, CanRedo, Undo, Redo, BeginUndoUnit, EndUndoUnit, UndoUnitLevel |
By default DockControl also uses following services that you can customize through the provided attached properties:
Service | Attached Properties |
---|---|
AutoHide | Animation, AnimationDuration. |
DockManager | DefaultFloatingPreviewSize, FloatingWindowStrategy. |
DocumentTab | ShowsIcon. |
WindowSwitcher | Hotkey |
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