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, IDockTarget
- Inheritance:
- object Visual UIElement FrameworkElement 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 DataTemplate to use for rendering the auto-hide tab items.
public DataTemplate AutoHideTabItemTemplate { get; set; }
Property Value
- DataTemplate:
The DataTemplate to use for rendering the auto-hide tab items.
AutoHideTabItemTemplateSelector
Gets or sets the DataTemplateSelector to use for rendering the auto-hide tab items.
public DataTemplateSelector AutoHideTabItemTemplateSelector { get; set; }
Property Value
- DataTemplateSelector:
The 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 FrameworkElement that is the child content of this container.
public FrameworkElement Child { get; set; }
Property Value
- FrameworkElement:
The FrameworkElement that is the child content of this container.
DockSite
Gets the DockSite that is managing this container.
public DockSite DockSite { get; }
Property Value
Icon
Gets the icon ImageSource for a window that contains this dock host.
public ImageSource Icon { get; }
Property Value
- ImageSource:
The icon 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
- bool:
trueif 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
- 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
- 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
- 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 Guid that uniquely identifies the control.
public Guid UniqueId { get; }
Property Value
Remarks
A new 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
Methods
ArrangeOverride(Size)
When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.
protected override Size ArrangeOverride(Size finalSize)
| Parameter | Type | Description |
|---|---|---|
| finalSize | Size | The final area within the parent that this element should use to arrange itself and its children. |
Returns
- Size:
The actual size used.
CloseAutoHidePopup(bool, bool)
Closes the auto-hide popup.
public void CloseAutoHidePopup(bool closeImmediately, bool blurFocus)
| Parameter | Type | Description |
|---|---|---|
| closeImmediately | bool | Whether to close the popup immediately. |
| blurFocus | bool | Whether to blur focus. |
GetVisibleToolWindowContainerCount(bool)
Returns the count of visible ToolWindowContainer controls in the container's hierarchy.
public int GetVisibleToolWindowContainerCount(bool includeAutoHiddenContainers)
| Parameter | Type | Description |
|---|---|---|
| includeAutoHiddenContainers | bool | Whether to include auto-hidden containers. |
Returns
- int:
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 AutomationPeer object for this control instance.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
An AutomationPeer instance.
OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs)
Reports that the IsKeyboardFocusWithin property changed.
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | DependencyPropertyChangedEventArgs | A |
OnKeyDown(KeyEventArgs)
Occurs when a key is pressed.
protected override void OnKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The KeyEventArgs that contains the event data. |
OnPreviewKeyDown(KeyEventArgs)
Occurs when a key is pressed.
protected override void OnPreviewKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The KeyEventArgs that contains the event data. |
OnRenderSizeChanged(SizeChangedInfo)
Occurs when the control's size is changed.
protected override void OnRenderSizeChanged(SizeChangedInfo sizeInfo)
| Parameter | Type | Description |
|---|---|---|
| sizeInfo | SizeChangedInfo | The size change info. |
ToString()
Returns a String that represents the current Object.
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