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 class.
public DockHost()
Properties
AutoHideBottomContainers
The collection of ToolWindowContainer items that appear in the bottom auto-hide tabstrip.
public ToolWindowContainerCollection AutoHideBottomContainers { get; }
Property Value
AutoHideLeftContainers
The collection of ToolWindowContainer items that appear in the left auto-hide tabstrip.
public ToolWindowContainerCollection AutoHideLeftContainers { get; }
Property Value
AutoHidePopupToolWindow
The ToolWindow that is currently open in the auto-hide popup, if any.
AutoHideRightContainers
The collection of ToolWindowContainer items that appear in the right auto-hide tabstrip.
public ToolWindowContainerCollection AutoHideRightContainers { get; }
Property Value
AutoHideTabItemTemplate
The DataTemplate to use for rendering the auto-hide tab items.
AutoHideTabItemTemplateSelector
The DataTemplateSelector to use for rendering the auto-hide tab items.
public DataTemplateSelector? AutoHideTabItemTemplateSelector { get; set; }
Property Value
AutoHideTopContainers
The collection of ToolWindowContainer items that appear in the top auto-hide tabstrip.
public ToolWindowContainerCollection AutoHideTopContainers { get; }
Property Value
Child
The FrameworkElement that is the child content of this container.
DockSite
The DockSite that is managing this container.
Icon
The icon ImageSource for a window that contains this dock host.
public ImageSource? Icon { get; }
Property Value
Remarks
This property value is based on the FloatingWindowIcon property.
IsAutoHidePopupOpen
Indicates whether the auto-hide popup is currently open.
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
The TabbedMdiHost or StandardMdiHost that is currently in use, if any.
SplitterSize
The size of splitters.
Title
The title text for a window that contains this dock host.
[Localizability(LocalizationCategory.Title)]
public string? Title { get; }
Property Value
Remarks
This property value is based on the FloatingWindowTitle property.
UniqueId
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
The Workspace, if any, that is in the dock host.
Methods
ArrangeOverride(Size?)
Called to arrange and size the content of a Control object.
protected override Size? ArrangeOverride(Size? finalSize)
| Parameter | Type | Description |
|---|---|---|
| finalSize | Size |
Returns
- Size:
The size of the control.
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
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnCreateAutomationPeer()
Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs?)
Invoked just before the IsKeyboardFocusWithinChanged event is raised by this element. Implement this method to add class handling for this event.
protected override void OnIsKeyboardFocusWithinChanged(DependencyPropertyChangedEventArgs? e)
| Parameter | Type | Description |
|---|---|---|
| e | DependencyPropertyChangedEventArgs | A System.Windows.DependencyPropertyChangedEventArgs that contains the event data. |
OnKeyDown(KeyEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.KeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The KeyEventArgs that contains the event data. |
OnPreviewKeyDown(KeyEventArgs)
Invoked when an unhandled System.Windows.Input.Keyboard.PreviewKeyDown attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnPreviewKeyDown(KeyEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyEventArgs | The KeyEventArgs that contains the event data. |
ToString()
Returns the string representation of this object.
Fields
AutoHidePopupToolWindowProperty
Defines the AutoHidePopupToolWindow property.
public static readonly DependencyProperty AutoHidePopupToolWindowProperty
AutoHideTabItemTemplateProperty
Defines the AutoHideTabItemTemplate property.
public static readonly DependencyProperty AutoHideTabItemTemplateProperty
AutoHideTabItemTemplateSelectorProperty
Defines the AutoHideTabItemTemplateSelector property.
public static readonly DependencyProperty AutoHideTabItemTemplateSelectorProperty
ChildProperty
Defines the Child property.
public static readonly DependencyProperty ChildProperty
IconProperty
Defines the Icon property.
public static readonly DependencyProperty IconProperty
SplitterSizeProperty
Defines the SplitterSize property.
public static readonly DependencyProperty SplitterSizeProperty
TitleProperty
Defines the Title property.
public static readonly DependencyProperty TitleProperty
UniqueIdProperty
Defines the UniqueId property.
public static readonly DependencyProperty UniqueIdProperty