Tool windows in auto-hide state show tabs along a tray area on the side of their dock host. When a tab is clicked, the related tool window's content is displayed in an animated popup.
The Solution Explorer tool window in AutoHide state with its popup displayed
Allowing Auto-Hide
Only tool windows can be auto-hidden. A global Docktrue
) determines the default value for whether they have that capability, but it can be overridden at an instance-level by setting the Tool
Programmatically Auto-Hiding a Tool Window
A tool window can be programmatically auto-hidden by calling the Tool
Behavior and Animation Options
These options control auto-hide functionality behavior and ensuing animation:
Member | Description |
---|---|
Dock |
Gets or sets whether auto-hide state toggles affect all the windows in the parent container. The default value is |
Gets or sets the time in milliseconds of the animation that is applied to an auto-hide popup close. The default value is |
|
Dock |
Gets or sets the time in milliseconds of the delay between when the pointer leaves an auto-hide popup and when the popup closes if the mouse has not moved back over the popup. This only applies when Auto |
Gets or sets the time in milliseconds of the animation that is applied to an auto-hide popup open. The default value is |
|
Dock |
Gets or sets the time in milliseconds of the delay between when the pointer moves over an auto-hide tab item and the auto-hide popup opens to display the tool window represented by the tab item. This only applies when Auto |
Dock |
Gets or sets whether the auto-hide popup displays when the mouse hovers over an auto-hide tab item. The default value is |
Appearance Options
These options control the appearance of auto-hide tabs:
Member | Description |
---|---|
Tool |
Gets or sets the DataTemplate containing contextual content that should be rendered in an auto-hide tab for this window. |
Dock |
Gets or sets the DataTemplate to use for rendering the auto-hide tab items. |
Dock |
Gets or sets the DataTemplateSelector to use for rendering the auto-hide tab items. |
Iterating Auto-Hidden Tool Windows
These Dock
- Dock
Site .AutoHide Left Containers - Dock
Site .AutoHide Top Containers - Dock
Site .AutoHide Right Containers - Dock
Site .AutoHide Bottom Containers
Each of those accepts one or more Tool
The properties above are simple wrappers for similar properties on the Dock
You can also examine each floating Dock
Determining If an Auto-Hide Popup Is Displayed
The Docktrue
when there is an auto-hide popup displayed.
The Docktrue
while it is open in the popup.
Preventing an Auto-Hide Popup from Closing
Auto-hide popups will close by default after a brief delay whenever the keyboard focus is moved outside of them. This can be a problem in scenarios where a dialog Window
is opened from the tool window displayed in the auto-hide popup. In that scenario, the keyboard focus moves to the dialog and the auto-hide popup is closed. However, you may wish to keep the auto-hide popup visible while the dialog is displayed so that focus properly returns to it when the dialog is closed.
This code shows how to display a dialog and keep any current auto-hide popup open:
Dynamically Altering the Auto-Hide Side
The Windows
The event is passed arguments of type Docking
Auto-Hide Popup Events
The Window
Notes on Interop Usage
If you use an interop (WinForms, ActiveX, etc.) control in your docking windows, auto-hide popups in their default configuration will not appear on top of the interop content due to WPF airspace issues with interop content in the same Window
. By setting the Dockfalse
, non-hosted popups will be used to display auto-hide content instead. This uses a separate Window
to render the popup and thereby allows WPF content in the popup to render above the interop content. The only downside to setting this property is that you lose the popup open/close animation.
See the Interop Compatibility topic for more information.