DockItem Class

DevZest WPF Docking

DockItem Class
Represents a dockable item hosted by a DockControl.
Inheritance Hierarchy
SystemObject  System.Windows.ThreadingDispatcherObject
    System.WindowsDependencyObject
      System.Windows.MediaVisual
        System.WindowsUIElement
          System.WindowsFrameworkElement
            System.Windows.ControlsControl
              System.Windows.ControlsContentControl
                DevZest.Windows.DockingDockItem

Namespace: DevZest.Windows.Docking
Assembly: DevZest.WpfDocking (in DevZest.WpfDocking.dll) Version: 2.5.0.0 (2.5.5912.0)
Syntax
public class DockItem : ContentControl, IDockItemUndoRedoReference
Public Class DockItem
	Inherits ContentControl
	Implements IDockItemUndoRedoReference

The DockItem type exposes the following members.

Constructors
  NameDescription
Public methodDockItem
Initializes a new instance of the DockItem class
Top
Properties
  NameDescription
Public propertyAllowedDockTreePositions
Gets or sets the allowed dock tree positions for this DockItem. This is a dependency property.
Public propertyAutoHideSize
Gets or sets the size of this DockItem when in auto hide mode. This is a dependency property.
Public propertyCanToggleAutoHide
Gets a value indicates whether the auto hide mode of this DockItem can be toggled.
Public propertyCanToggleFloating
Gets a value indicates whether the floating mode of this DockItem can be toggled.
Public propertyDefaultDockPosition
Gets or sets the default DockPosition for this DockItem. This is a dependency property.
Public propertyDescription
Gets or sets the description of this DockItem. This is a dependency property.
Public propertyDockControl
Gets the DockControl object associated with this DockItem. This is a dependency property.
Public propertyDockPosition
Gets the dock position of this DockItem. This is a dependency property.
Public propertyDockTreePosition
Gets the dock tree position of this DockItem.
Public propertyFirstPane
Gets the first DockPane that this DockItem associated with. This is a dependency property.
Public propertyHideOnPerformClose
Gets or sets the value indicates whether hides or closes this DockItem when calling PerformClose.
Public propertyIcon
Gets or sets the DockItem object's icon. This is a dependency property.
Public propertyIsActiveDocument
Gets a value indicates whether this DockItem is active document. This is a dependency property.
Public propertyIsActiveItem
Gets a value indicates whether this DockItem is active. This is a dependency property.
Public propertyIsAutoHide
Gets a value indicates whether the DockItem is in auto hide mode.
Public propertyIsHidden
Gets a value indicates whether the DockItem is invisible. This is a dependency property.
Public propertyIsSelected
Gets a value indicates whether this DockItem is selected. This is a dependency property.
Public propertySecondPane
Gets the second DockPane that this DockItem associated with. This is a dependency property.
Public propertyShowAction
Gets or sets the show action in XAML initialization.
Public propertyTabContextMenu
Gets or sets the DockItem object's context menu to display for the tab. This is a dependency property.
Public propertyTabText
Gets or sets the DockItem object's text when shown as tabbed. This is a dependency property.
Public propertyTitle
Gets or sets the DockItem object's title. This is a dependency property.
Protected propertyUndoRedoReference
Gets a value provides a DockItem reference for undo/redo.
Top
Methods
  NameDescription
Public methodActivate
Activates the DockItem and gives it focus.
Public methodClose
Closes the DockItem.
Public methodHide
Makes the DockItem invisible.
Protected methodOnClosing
Raises the Closing event.
Protected methodOnStateChanged
Raises the StateChanged event.
Protected methodOnStateChanging
Raises the StateChanging event.
Public methodPerformClose
Hides or closes the DockItem, depending on the value of HideOnPerformClose property.
Protected methodSave
Saves the DockItem.
Public methodShow(DockControl)
Shows the DockItem targeting specified DockControl, as activated.
Public methodShow(DockItemShowMethod)
Shows the DockItem, using specified DockItemShowMethod.
Public methodShow(DockControl, DockItemShowMethod)
Shows the DockItem targeting specified DockControl, using specified DockItemShowMethod.
Public methodShow(DockControl, DockPosition)
Shows the DockItem to specified dock position, as activated.
Public methodShow(DockControl, Rect)
Shows the DockItem as activated floating window.
Public methodShow(DockItem, DockItemShowMethod)
Shows the DockItem as tabeed, using specified show method.
Public methodShow(DockPane, Int32)
Shows the DockItem as activated and tabbed.
Public methodShow(DockControl, DockPosition, DockItemShowMethod)
Shows the DockItem to specified dock position, using specified show method.
Public methodShow(DockControl, Rect, DockItemShowMethod)
Shows the DockItem as floating window, using specified show method.
Public methodShow(DockPane, Int32, DockItemShowMethod)
Shows the DockItem as tabbed, using specified show method.
Public methodShow(DockPaneNode, Dock, SplitterDistance)
Shows the DockItem as activated non auto hide DockPane, side by side of target DockPaneNode.
Public methodShow(DockControl, Dock, Boolean, DockItemShowMethod)
Shows the DockItem to the edge of DockControl, brings the respective dock tree to front or sends it to back, using specified show method.
Public methodShow(DockPaneNode, Boolean, Dock, SplitterDistance, Boolean, DockItemShowMethod)
Shows the DockItem as DockPane, side by side of target DockPane, using specified auto hide state, size for target setting and show method.
Public methodToggleAutoHide
Toggles the auto hide state of the DockItem object's FirstPane, using default DockItemShowMethod for this DockItem.
Public methodToggleAutoHide(DockItemShowMethod)
Toggles the auto hide state of the DockItem object's FirstPane, using specified DockItemShowMethod for this DockItem.
Public methodToggleFloating
Toggles the floating state of the DockItem, as activated.
Public methodToggleFloating(DockItemShowMethod)
Toggles the floating state of the DockItem, using specified show method.
Top
Events
  NameDescription
Public eventClosing
Occurs when the DockItem is closing.
Public eventStateChanged
Occurs when the state of DockItem is changed.
Public eventStateChanging
Occurs when the state of DockItem is changing.
Top
Fields
  NameDescription
Public fieldStatic memberAllowedDockTreePositionsProperty
Identifies the AllowedDockTreePositions dependency property.
Public fieldStatic memberAutoHideSizeProperty
Identifies the AutoHideSize dependency property.
Public fieldStatic memberDefaultDockPositionProperty
Identifies the DefaultDockPosition dependency property.
Public fieldStatic memberDescriptionProperty
Identifies the Description dependency property.
Public fieldStatic memberDockControlProperty
Identifies the DockControl dependency property.
Public fieldStatic memberDockPositionProperty
Identifies the DockPosition dependency property.
Public fieldStatic memberFirstPaneProperty
Identifies the FirstPane dependency property.
Public fieldStatic memberHideOnPerformCloseProperty
Identifies the HideOnPerformClose dependency property.
Public fieldStatic memberIconProperty
Identifies the Icon dependency property.
Public fieldStatic memberIsActiveDocumentProperty
Identifies the IsActiveDocument dependency property.
Public fieldStatic memberIsActiveItemProperty
Identifies the IsActiveItem dependency property.
Public fieldStatic memberIsHiddenProperty
Identifies the IsHidden dependency property.
Public fieldStatic memberIsSelectedProperty
Identifies the IsSelected dependency property.
Public fieldStatic memberSecondPaneProperty
Identifies the SecondPane dependency property.
Public fieldStatic memberTabContextMenuProperty
Identifies the TabContextMenu dependency property.
Public fieldStatic memberTabTextProperty
Identifies the TabText dependency property.
Public fieldStatic memberTitleProperty
Identifies the Title dependency property.
Top
Remarks

Content Model: DockItem derives from ContentControl class, set the Content property to organize the UI of the dockable item.

Use AllowedDockTreePositions, AutoHideSize, DefaultDockPosition, Description, Icon, TabContextMenu, TabText and Title properties to customize the DockItem.

Call Show method to show the DockItem; call Activate method to activate the DockItem; call Close method to close the DockItem (disconnect the DockItem from DockControl); call PerformClose method to close or hide the DockItem, depending on the value of HideOnPerformClose property. You may intercept the Closing event to cancel the DockItem closing.

The DockItem has the following state reflected by its DockPosition and other properties:

StateDockPositionDescription
DisconnectedUnknownThe DockItem is not connected to any DockControl. The values of its DockControl, FirstPane and SecondPane properties are all .
HiddenHiddenThe DockItem is hidden with its IsHidden property set to .
Visibleother valuesThe DockItem is visible with its IsHidden property set to , plus the following properties to reflect the state:

Call ToggleAutoHide method to toggle the auto hide state of the DockItem's FirstPane; call ToggleFloating method to toggle the floating state of the DockItem.

You may intercept the StateChanging or StateChanged event, which occurs before or after the state of DockItem changed.

Derived class may override the Save method to return a object instance represents this DockItem for saving/loading the window layout, or override the UndoRedoReference property to return a DockItem reference for undo/redo.

See Also