In This Article

DockHost Class

Represents a root host that can contain a docking window hierarchy.

[TemplatePart(Name = "PART_AutoHideBottomTabStrip", Type = typeof(AutoHideTabStrip))]
[TemplatePart(Name = "PART_AutoHideLeftTabStrip", Type = typeof(AutoHideTabStrip))]
[TemplatePart(Name = "PART_AutoHideRightTabStrip", Type = typeof(AutoHideTabStrip))]
[TemplatePart(Name = "PART_AutoHideTopTabStrip", Type = typeof(AutoHideTabStrip))]
[TemplatePart(Name = "PART_ContentHost", Type = typeof(Panel))]
public class DockHost : Control, DUCE.IResource, IAnimatable, IFrameworkInputElement, IInputElement, ISupportInitialize, IHaveResources, IQueryAmbient, IDragDockTarget, IDockTarget, IHierarchyNode
Inheritance:
System.Object System.Windows.Threading.DispatcherObject System.Windows.DependencyObject System.Windows.Media.Visual System.Windows.UIElement System.Windows.FrameworkElement System.Windows.Controls.Control Object
Implements:
IDockTarget

Constructors

DockHost()

Initializes an instance of the DockHost class.

public DockHost()

Properties

AutoHideBottomContainers

Gets the collection of ToolWindowContainer items that appear in the bottom auto-hide tabstrip.

public ToolWindowContainerCollection AutoHideBottomContainers { get; }

Property Value

ToolWindowContainerCollection:

The collection of ToolWindowContainer items that appear in the bottom auto-hide tabstrip.

AutoHideLeftContainers

Gets the collection of ToolWindowContainer items that appear in the left auto-hide tabstrip.

public ToolWindowContainerCollection AutoHideLeftContainers { get; }

Property Value

ToolWindowContainerCollection:

The collection of ToolWindowContainer items that appear in the left auto-hide tabstrip.

AutoHidePopupToolWindow

Gets the ToolWindow that is currently open in the auto-hide popup, if any.

public ToolWindow AutoHidePopupToolWindow { get; }

Property Value

ToolWindow:

The ToolWindow that is currently open in the auto-hide popup, if any.

AutoHideRightContainers

Gets the collection of ToolWindowContainer items that appear in the right auto-hide tabstrip.

public ToolWindowContainerCollection AutoHideRightContainers { get; }

Property Value

ToolWindowContainerCollection:

The collection of ToolWindowContainer items that appear in the right auto-hide tabstrip.

AutoHideTabItemTemplate

Gets or sets the System.Windows.DataTemplate to use for rendering the auto-hide tab items.

public DataTemplate AutoHideTabItemTemplate { get; set; }

Property Value

System.Windows.DataTemplate:

The System.Windows.DataTemplate to use for rendering the auto-hide tab items.

AutoHideTabItemTemplateSelector

Gets or sets the System.Windows.Controls.DataTemplateSelector to use for rendering the auto-hide tab items.

public DataTemplateSelector AutoHideTabItemTemplateSelector { get; set; }

Property Value

System.Windows.Controls.DataTemplateSelector:

The System.Windows.Controls.DataTemplateSelector to use for rendering the auto-hide tab items.

AutoHideTopContainers

Gets the collection of ToolWindowContainer items that appear in the top auto-hide tabstrip.

public ToolWindowContainerCollection AutoHideTopContainers { get; }

Property Value

ToolWindowContainerCollection:

The collection of ToolWindowContainer items that appear in the top auto-hide tabstrip.

Child

Gets or sets the System.Windows.FrameworkElement that is the child content of this container.

public FrameworkElement Child { get; set; }

Property Value

System.Windows.FrameworkElement:

The System.Windows.FrameworkElement that is the child content of this container.

DockSite

Gets the DockSite that is managing this container.

public DockSite DockSite { get; }

Property Value

DockSite:

The DockSite that is managing this container.

Icon

Gets the icon System.Windows.Media.ImageSource for a window that contains this dock host.

public ImageSource Icon { get; }

Property Value

System.Windows.Media.ImageSource:

The icon System.Windows.Media.ImageSource for a window that contains this dock host.

Remarks

This property value is based on the FloatingWindowIcon property.

IsAutoHidePopupOpen

Gets whether the auto-hide popup is currently open.

public bool IsAutoHidePopupOpen { get; }

Property Value

System.Boolean:

true if the auto-hide popup is currently open; otherwise, false.

LogicalChildren

Gets an enumerator for logical child elements of this element.

protected override IEnumerator LogicalChildren { get; }

Property Value

System.Collections.IEnumerator:

An enumerator for logical child elements of this element.

MdiHost

Gets the TabbedMdiHost or StandardMdiHost that is currently in use, if any.

public MdiHostBase MdiHost { get; }

Property Value

MdiHostBase:

The TabbedMdiHost or StandardMdiHost that is currently in use, if any.

SplitterSize

Gets or sets the size of splitters.

public double SplitterSize { get; set; }

Property Value

System.Double:

The size of splitters. The default value is 5.

Title

Gets the title text for a window that contains this dock host.

[Localizability(LocalizationCategory.Title)]
public string Title { get; }

Property Value

System.String:

The title text for a window that contains this dock host.

Remarks

This property value is based on the FloatingWindowTitle property.

UniqueId

Gets the System.Guid that uniquely identifies the control.

public Guid UniqueId { get; }

Property Value

System.Guid:

The System.Guid that uniquely identifies the control.

Remarks

A new System.Guid value is assigned to this property every time the application is run.

Workspace

Gets the Workspace, if any, that is in the dock host.

public Workspace Workspace { get; }

Property Value

Workspace:

The Workspace, if any, that is in the dock host.

Methods

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a System.Windows.FrameworkElement derived class.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize System.Windows.Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

System.Windows.Size:

The actual size used.

CloseAutoHidePopup(Boolean, Boolean)

Closes the auto-hide popup.

public void CloseAutoHidePopup(bool closeImmediately, bool blurFocus)
Parameter Type Description
closeImmediately System.Boolean

Whether to close the popup immediately.

blurFocus System.Boolean

Whether to blur focus.

GetVisibleToolWindowContainerCount(Boolean)

Returns the count of visible ToolWindowContainer controls in the container's hierarchy.

public int GetVisibleToolWindowContainerCount(bool includeAutoHiddenContainers)
Parameter Type Description
includeAutoHiddenContainers System.Boolean

Whether to include auto-hidden containers.

Returns

System.Int32:

The count of visible ToolWindowContainer controls in the container's hierarchy.

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns an System.Windows.Automation.Peers.AutomationPeer object for this control instance.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

System.Windows.Automation.Peers.AutomationPeer:

An System.Windows.Automation.Peers.AutomationPeer instance.

OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)

Reports that the IsKeyboardFocusWithin property changed.

protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
Parameter Type Description
e System.Windows.DependencyPropertyChangedEventArgs

A DependencyPropertyChangedEventArgs that contains the event data.

OnKeyDown(KeyEventArgs)

Occurs when a key is pressed.

protected override void OnKeyDown(KeyEventArgs e)
Parameter Type Description
e System.Windows.Input.KeyEventArgs

The System.Windows.Input.KeyEventArgs that contains the event data.

OnPreviewKeyDown(KeyEventArgs)

Occurs when a key is pressed.

protected override void OnPreviewKeyDown(KeyEventArgs e)
Parameter Type Description
e System.Windows.Input.KeyEventArgs

The System.Windows.Input.KeyEventArgs that contains the event data.

ToString()

Returns a String that represents the current Object.

public override string ToString()

Returns

System.String:

A String that represents the current Object.

Explicit Interface Implementations

IDockTarget.DockHost

Gets the owner DockHost.

DockHost IDockTarget.DockHost { get; }

Returns

DockHost:

The owner DockHost.

IDockTarget.DockSite

Gets the DockSite that is managing this container.

DockSite IDockTarget.DockSite { get; }

Returns

DockSite:

The DockSite that is managing this container.

IDockTarget.GetState(Nullable<Side>)

Returns the DockingWindowState that specifies the state of the docking location around the target.

DockingWindowState IDockTarget.GetState(Side? side)
Parameter Type Description
side System.Nullable<Side>

Returns

DockingWindowState:

The DockingWindowState that specifies the state of the docking location around the target.

Fields

AutoHidePopupToolWindowProperty

Identifies the AutoHidePopupToolWindow dependency property. This field is read-only.

public static readonly DependencyProperty AutoHidePopupToolWindowProperty

AutoHideTabItemTemplateProperty

Identifies the AutoHideTabItemTemplate dependency property. This field is read-only.

public static readonly DependencyProperty AutoHideTabItemTemplateProperty

AutoHideTabItemTemplateSelectorProperty

Identifies the AutoHideTabItemTemplateSelector dependency property. This field is read-only.

public static readonly DependencyProperty AutoHideTabItemTemplateSelectorProperty

ChildProperty

Identifies the Child dependency property. This field is read-only.

public static readonly DependencyProperty ChildProperty

IconProperty

Identifies the Icon dependency property. This field is read-only.

public static readonly DependencyProperty IconProperty

SplitterSizeProperty

Identifies the SplitterSize dependency property. This field is read-only.

public static readonly DependencyProperty SplitterSizeProperty

TitleProperty

Identifies the Title dependency property. This field is read-only.

public static readonly DependencyProperty TitleProperty

UniqueIdProperty

Identifies the UniqueId dependency property. This field is read-only.

public static readonly DependencyProperty UniqueIdProperty

Inherited Members

  • System.Object.Equals(System.Object)
  • System.Object.Equals(System.Object, System.Object)
  • System.Object.ReferenceEquals(System.Object, System.Object)
  • System.Object.GetHashCode()
  • System.Object.GetType()
  • System.Object.MemberwiseClone()

Extension Methods