In This Article

DockManager Class

Provides a manager for controlling dock objects.

[ToolboxBitmap(typeof(DockManager))]
public class DockManager : Component, IDisposable, IDockObject, IWeakEventListener
Inheritance:
object MarshalByRefObject Component object
Implements:
IDisposable IDockObject IWeakEventListener

Constructors

DockManager()

Initializes a new instance of the DockManager class.

public DockManager()

Remarks

The default constructor initializes all fields to their default values.

DockManager(IContainer)

Initializes a new instance of the DockManager class.

public DockManager(IContainer container)
Parameter Type Description
container IContainer

An IContainer that represents the container for the component.

Properties

ActiveDocuments

Gets the collection of active TabbedMdiWindow controls in the MDI area.

[Browsable(false)]
public TabbedMdiWindowCollection ActiveDocuments { get; }

Property Value

TabbedMdiWindowCollection:

A DocumentWindowCollection containing the collection of active TabbedMdiWindow controls in the MDI area.

AutoCreateToolWindowsForLayoutLoad

Gets or sets whether to automatically create tool windows specified in a tool window layout that don't exist when the layout is loaded.

public bool AutoCreateToolWindowsForLayoutLoad { get; set; }

Property Value

bool:

true if tool windows should be automatically created; otherwise, false.

AutoHideButtonAffectsSelectedTabOnly

Gets or sets whether the pressing of the auto-hide button affects the selected tab only.

public bool AutoHideButtonAffectsSelectedTabOnly { get; set; }

Property Value

bool:

true if the pressing of the auto-hide button affects the selected tab only; otherwise, false.

AutoHideCloseDelay

Gets or sets the delay (in milliseconds) to leave a visible auto-hide window open when the mouse moves away from it.

public int AutoHideCloseDelay { get; set; }

Property Value

int:

The delay (in milliseconds) to leave a visible auto-hide window open when the mouse moves away from it. The default value is 1000 milliseconds, or 1 second.

AutoHideCommand

Gets the Command that is used for auto-hide.

[Browsable(false)]
public static Command AutoHideCommand { get; }

Property Value

Command:

The Command that is used for auto-hide.

AutoHideHideSteps

Gets or sets the number of steps to use for animation when hiding auto-hide tool windows.

public int AutoHideHideSteps { get; set; }

Property Value

int:

The number of steps to use for animation when hiding auto-hide tool windows. The default value is 10.

Remarks

Set this value to 1 for instantaneous hiding.

AutoHideShowOnMouseHover

Gets or sets whether to show auto-hidden tool windows when the mouse hovers over their tabs.

public bool AutoHideShowOnMouseHover { get; set; }

Property Value

bool:

true if auto-hidden tool windows should be displayed when the mouse hovers over their tabs; otherwise, false.

Remarks

When this property is false, the user must click on a tab to display its related tool window. Clicking on the tab again while the tool window is displayed will close the flyout.

AutoHideShowSteps

Gets or sets the number of steps to use for animation when showing auto-hide tool windows.

public int AutoHideShowSteps { get; set; }

Property Value

int:

The number of steps to use for animation when showing auto-hide tool windows. The default value is 10.

Remarks

Set this value to 1 for instantaneous showing.

AutoHideTabStripPanelBottom

Gets the AutoHideTabStripPanel that is currently in use for the bottom side of the host container, if any.

[Browsable(false)]
public AutoHideTabStripPanel AutoHideTabStripPanelBottom { get; }

Property Value

AutoHideTabStripPanel:

The AutoHideTabStripPanel that is currently in use for the bottom side of the host container, if any.

AutoHideTabStripPanelLeft

Gets the AutoHideTabStripPanel that is currently in use for the left side of the host container, if any.

[Browsable(false)]
public AutoHideTabStripPanel AutoHideTabStripPanelLeft { get; }

Property Value

AutoHideTabStripPanel:

The AutoHideTabStripPanel that is currently in use for the left side of the host container, if any.

AutoHideTabStripPanelRight

Gets the AutoHideTabStripPanel that is currently in use for the right side of the host container, if any.

[Browsable(false)]
public AutoHideTabStripPanel AutoHideTabStripPanelRight { get; }

Property Value

AutoHideTabStripPanel:

The AutoHideTabStripPanel that is currently in use for the right side of the host container, if any.

AutoHideTabStripPanelTop

Gets the AutoHideTabStripPanel that is currently in use for the top side of the host container, if any.

[Browsable(false)]
public AutoHideTabStripPanel AutoHideTabStripPanelTop { get; }

Property Value

AutoHideTabStripPanel:

The AutoHideTabStripPanel that is currently in use for the top side of the host container, if any.

AutoSelectTabOnDragOver

Gets or sets whether to automatically select a TabbedMdiWindow when a drag operation is moved over its tab.

public bool AutoSelectTabOnDragOver { get; set; }

Property Value

bool:

true if a TabbedMdiWindow should be automatically selected when a drag operation is moved over its tab; otherwise, false.

CloseButtonAffectsSelectedTabOnly

Gets or sets whether the pressing of the close button affects the selected tab only.

public bool CloseButtonAffectsSelectedTabOnly { get; set; }

Property Value

bool:

true if the pressing of the close button affects the selected tab only; otherwise, false.

CloseCommand

Gets the Command that is used for a close.

[Browsable(false)]
public static Command CloseCommand { get; }

Property Value

Command:

The Command that is used for a close.

DefaultMdiWindowState

Gets or sets the default FormWindowState to assign to MDI windows when they are created.

public FormWindowState DefaultMdiWindowState { get; set; }

Property Value

FormWindowState:

The default FormWindowState to assign to MDI windows when they are created.

DisposeDocumentWindowsAfterClose

Gets or sets whether to automatically dispose DocumentWindow objects after they are closed.

public bool DisposeDocumentWindowsAfterClose { get; set; }

Property Value

bool:

true if DocumentWindow objects should be automatically disposed after they are closed; otherwise, false.

DockGuideStyle

Gets or sets a DockGuideStyle indicating the style of dock guides to use.

public DockGuideStyle DockGuideStyle { get; set; }

Property Value

DockGuideStyle:

A DockGuideStyle indicating the style of dock guides to use.

DockHintStyle

Gets or sets a DockHintStyle indicating the style of docking hints to use.

public DockHintStyle DockHintStyle { get; set; }

Property Value

DockHintStyle:

A DockHintStyle indicating the style of docking hints to use.

DockObjectType

Gets a DockObjectType specifying the type of dock object.

public DockObjectType DockObjectType { get; }

Property Value

DockObjectType:

A DockObjectType specifying the type of dock object.

DockRenderer

Gets or sets the IDockRenderer used to render the dock controls.

public IDockRenderer DockRenderer { get; set; }

Property Value

IDockRenderer:

The IDockRenderer used to render the dock controls.

DockRendererResolved

Gets the IDockRenderer used to render the dock controls.

[Browsable(false)]
public IDockRenderer DockRendererResolved { get; }

Property Value

IDockRenderer:

The IDockRenderer used to render the dock controls.

Remarks

This property will return a global renderer if there is no control instance renderer override. The registered renderer type with the UIRendererManager for this property is IDockRenderer.

DocumentLayoutData

Gets or sets the current layout of all the documents in tabbed MDI managed by this DockManager.

[Browsable(false)]
public XmlDocument DocumentLayoutData { get; set; }

Property Value

XmlDocument:

An XmlDocument containing the layout data of the current tabbed MDI document layout.

Remarks

This property may throw an exception while loading if the layout data is invalid.

DocumentMdiStyle

Gets or sets the DocumentMdiStyle indicating the type of MDI to use for documents.

public DocumentMdiStyle DocumentMdiStyle { get; set; }

Property Value

DocumentMdiStyle:

The DocumentMdiStyle indicating the type of MDI to use for documents.

DocumentWindows

Gets the collection of DocumentWindow controls being managed by this DockManager.

[Browsable(false)]
public DocumentWindowCollection DocumentWindows { get; }

Property Value

DocumentWindowCollection:

A DocumentWindowCollection containing the collection of DocumentWindow controls being managed by this DockManager.

DocumentWindowsCanClose

Gets or sets the global setting for whether document windows can be closed.

public bool DocumentWindowsCanClose { get; set; }

Property Value

bool:

true if document windows can be closed; otherwise, false.

Remarks

This setting only affects document windows whose CanClose property is set to DefaultableBoolean.Default. Any other setting on the document window instance overrides this global setting.

DocumentWindowsCanFloat

Gets or sets the global setting for whether document windows may be contained in a floating window.

public bool DocumentWindowsCanFloat { get; set; }

Property Value

bool:

true if document windows may be contained in a floating window; otherwise, false.

Remarks

This setting only affects document windows whose CanFloat property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

FocusedTabbedMdiWindow

Gets the TabbedMdiWindow that currently contains the focus.

public TabbedMdiWindow FocusedTabbedMdiWindow { get; }

Property Value

TabbedMdiWindow:

The TabbedMdiWindow that currently contains the focus.
A null reference is returned if no window currently has the focus.

FocusedToolWindow

Gets the ToolWindow that currently contains the focus.

[Browsable(false)]
public ToolWindow FocusedToolWindow { get; }

Property Value

ToolWindow:

The ToolWindow that currently contains the focus.
A null reference is returned if no tool window currently has the focus.

HideAutoHideToolWindowsAfterStateChange

Gets or sets whether to hide auto-hide tool windows immediately after a state change.

public bool HideAutoHideToolWindowsAfterStateChange { get; set; }

Property Value

bool:

true if the auto-hide windows should be hidden; otherwise, false.

HideUnfocusedAutoHideToolWindowsOnMouseLeave

Gets or sets whether to hide unfocused auto-hide tool windows that are displayed when the mouse leaves them.

public bool HideUnfocusedAutoHideToolWindowsOnMouseLeave { get; set; }

Property Value

bool:

true if the unfocused auto-hide windows should be hidden; otherwise, false.

HostContainerControl

Gets or sets the ContainerControl that should be used as the topmost parent for docking.

public ContainerControl HostContainerControl { get; set; }

Property Value

ContainerControl:

The ContainerControl that should be used as the topmost parent for docking.

IgnoreAutoHideMouseClicks

Gets or sets whether to ignore mouse clicks that would hide a displayed auto-hide window.

public bool IgnoreAutoHideMouseClicks { get; set; }

Property Value

bool:

true if mouse clicks outside a displayed auto-hide window should close it; otherwise, false.

ImageList

Gets or sets the ImageList used for item images.

public ImageList ImageList { get; set; }

Property Value

ImageList:

An ImageList. The default value is a null reference.

KeyboardNavigationEnabled

Gets or sets whether keyboard navigation is enabled when the NextWindowNavigationEnabled is false.

public bool KeyboardNavigationEnabled { get; set; }

Property Value

bool:

true if keyboard navigation is enabled when the NextWindowNavigationEnabled is false; otherwise, false.

Remarks

If NextWindowNavigationEnabled is false and keyboard navigation is enabled, the Ctrl+Tab and Ctrl+Shift+Tab keys will switch documents.

MagnetismGapDistance

Gets or sets the distance between windows that are snapped together via magnetism.

public int MagnetismGapDistance { get; set; }

Property Value

int:

The distance between windows that are snapped together via magnetism. The default value is 1.

Remarks

If this value is greater than 0, there will be a gap between windows that are snapped together when magnetism is enabled by the MagnetismSnapDistance property.

MagnetismSnapDistance

Gets or sets the distance at which magnetism begins to snap windows being dragged.

public int MagnetismSnapDistance { get; set; }

Property Value

int:

The distance at which magnetism begins to snap windows being dragged. The default value is 5.

Remarks

If this value is greater than 0, magnetism is enabled. Set it to 0 to disable magnetism. Magnetism tries to snap corners of a window being dragged to other window corners around it. Increase this property's value to increase the range over which the magnetism will work. Magnetism also takes effect when resizing via window borders.

MultipleTabbedMdiGroupsEnabled

Gets or sets whether multiple tabbed MDI groups are enabled.

public bool MultipleTabbedMdiGroupsEnabled { get; set; }

Property Value

bool:

true if multiple tabbed MDI groups are enabled; otherwise, false.

Remarks

If set to false, run-time end user features for creating new tabbed MDI groups will not display.

NextWindowNavigationActive

Gets or sets whether next window navigation is currently active, meaning the form for navigating to another docking window is visible.

[Browsable(false)]
public bool NextWindowNavigationActive { get; }

Property Value

bool:

true if next window navigation is currently active; otherwise, false.

NextWindowNavigationEnabled

Gets or sets whether next window navigation is enabled.

public bool NextWindowNavigationEnabled { get; set; }

Property Value

bool:

true if next window navigation is enabled; otherwise, false.

Remarks

If next window navigation is enabled, the Ctrl+Tab and Ctrl+Shift+Tab keys will activate the form for document window navigation, and the Alt+F7 and Alt+Shift+F7 keys will activate the form for tool window navigation.

NextWindowNavigationType

Gets or sets a NextWindowNavigationType indicating the type of Next Window Navigation functionality to provide.

public NextWindowNavigationType NextWindowNavigationType { get; set; }

Property Value

NextWindowNavigationType:

A NextWindowNavigationType indicating the type of functionality to provide.

OptionsCommand

Gets the Command that is used for more options.

[Browsable(false)]
public static Command OptionsCommand { get; }

Property Value

Command:

The Command that is used for more options.

SelectedDocument

Gets the TabbedMdiWindow that is currently selected.

[Browsable(false)]
public TabbedMdiWindow SelectedDocument { get; }

Property Value

TabbedMdiWindow:

The TabbedMdiWindow that is currently selected.

StandardMdiAutoWindowLayoutEnabled

Gets or sets whether new windows that display in standard MDI will be automatically positioned or whether they will be positioned using their StandardMdiBounds property value.

public bool StandardMdiAutoWindowLayoutEnabled { get; set; }

Property Value

bool:

true if new windows that display in standard MDI will be automatically positioned; otherwise, false.

TabbedMdiContainerButtonStyle

Gets or sets the button style to use for accessing tabbed MDI windows in a TabbedMdiContainer.

public TabbedMdiContainerButtonStyle TabbedMdiContainerButtonStyle { get; set; }

Property Value

TabbedMdiContainerButtonStyle:

A TabbedMdiContainerButtonStyle that indicates the button style.

TabbedMdiContainerTabStripRenderer

Gets or sets the control-specific ITabStripRenderer to use for drawing the TabStrip controls in tabbed MDI containers.

public ITabStripRenderer TabbedMdiContainerTabStripRenderer { get; set; }

Property Value

ITabStripRenderer:

The control-specific ITabStripRenderer to use for drawing the TabStrip controls in tabbed MDI containers.

TabbedMdiContainerTabStripRendererResolved

Gets the ITabStripRenderer used for drawing the TabStrip controls in tabbed MDI containers.

[Browsable(false)]
public ITabStripRenderer TabbedMdiContainerTabStripRendererResolved { get; }

Property Value

ITabStripRenderer:

The ITabStripRenderer used for drawing the TabStrip controls in tabbed MDI containers.

Remarks

This property will return a global renderer if there is no control instance renderer override. The registered renderer type with the UIRendererManager for this property is IDocumentWindowTabStripRenderer.

TabbedMdiDragDropEnabled

Gets or sets whether tabbed MDI tabs support drag/drop.

public bool TabbedMdiDragDropEnabled { get; set; }

Property Value

bool:

true if tabbed MDI tabs support drag/drop; otherwise, false.

TabbedMdiMaximumTabExtent

Gets or sets the maximum extent of an MDI tab.

public int TabbedMdiMaximumTabExtent { get; set; }

Property Value

int:

The maximum extent of an MDI tab.

TabbedMdiRightClickSelectsTab

Gets or sets whether a right-click on a tab selects the related page.

public bool TabbedMdiRightClickSelectsTab { get; set; }

Property Value

bool:

true if a right-click on a tab selects the related page; otherwise, false.

TabbedMdiRootContainer

Gets the TabbedMdiRootContainer that is currently in use.

[Browsable(false)]
public TabbedMdiRootContainer TabbedMdiRootContainer { get; }

Property Value

TabbedMdiRootContainer:

The TabbedMdiRootContainer that is currently in use.

Remarks

This property only returns a value if the DocumentMdiStyle is Tabbed.

TabbedMdiSingleTabVisible

Gets or sets whether an MDI tab should still be visible if there is only one document open.

public bool TabbedMdiSingleTabVisible { get; set; }

Property Value

bool:

true if the tab should be visible; otherwise, false.

TabbedMdiTabImagesVisible

Gets or sets whether images should be displayed in tabbed MDI window tabs.

public bool TabbedMdiTabImagesVisible { get; set; }

Property Value

bool:

true if images should be displayed in tabbed MDI window tabs; otherwise, false.

TabbedMdiTabsAlignNear

Gets or sets whether the tabs in tabbed MDI should align on the near side (left, top) of the tab container or on the far side (right, bottom).

public bool TabbedMdiTabsAlignNear { get; set; }

Property Value

bool:

true if the tabs in tabbed MDIshould align on the near side of the tab container; otherwise, false.

TabbedMdiWindowsInsertAtEnd

Gets or sets whether new windows placed in the tabbed MDI area insert at the end of the current tab group.

public bool TabbedMdiWindowsInsertAtEnd { get; set; }

Property Value

bool:

true if new windows placed in the tabbed MDI area insert at the end of the current tab group; otherwise, false.

ToolWindowContainerTabStripRenderer

Gets or sets the control-specific ITabStripRenderer to use for drawing the TabStrip controls in tool window containers.

public ITabStripRenderer ToolWindowContainerTabStripRenderer { get; set; }

Property Value

ITabStripRenderer:

The control-specific ITabStripRenderer to use for drawing the TabStrip controls in tool window containers.

ToolWindowContainerTabStripRendererResolved

Gets the ITabStripRenderer used for drawing the TabStrip controls in tool window containers.

[Browsable(false)]
public ITabStripRenderer ToolWindowContainerTabStripRendererResolved { get; }

Property Value

ITabStripRenderer:

The ITabStripRenderer used for drawing the TabStrip controls in tool window containers.

Remarks

This property will return a global renderer if there is no control instance renderer override. The registered renderer type with the UIRendererManager for this property is IToolWindowTabStripRenderer.

ToolWindowLayoutData

Gets or sets the current layout of all the tool windows managed by this DockManager.

[Browsable(false)]
public XmlDocument ToolWindowLayoutData { get; set; }

Property Value

XmlDocument:

An XmlDocument containing the layout data of the current tool window layout.

Remarks

This property may throw an exception while loading if the layout data is invalid.

ToolWindowScreenBoundsCheckEnabled

Gets or sets whether tool windows should be forced back onto a visible Screen when undocked.

public bool ToolWindowScreenBoundsCheckEnabled { get; set; }

Property Value

bool:

true if tool windows should be forced back onto a visible Screen when undocked; otherwise, false.

ToolWindows

Gets the collection of ToolWindow controls being managed by this DockManager.

[Browsable(false)]
public ToolWindowCollection ToolWindows { get; }

Property Value

ToolWindowCollection:

A ToolWindowCollection containing the collection of ToolWindow controls being managed by this DockManager.

ToolWindowsCanAttach

Gets or sets the global setting for whether tool windows may be attached to another tool window.

public bool ToolWindowsCanAttach { get; set; }

Property Value

bool:

true if tool windows may be attached to another tool window; otherwise, false.

Remarks

This setting only affects tool windows whose CanAttach property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanAutoHide

Gets or sets the global setting for whether tool windows may be placed in auto-hide mode.

public bool ToolWindowsCanAutoHide { get; set; }

Property Value

bool:

true if tool windows may be placed in auto-hide mode; otherwise, false.

Remarks

This setting only affects tool windows whose CanAutoHide property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanBecomeDocuments

Gets or sets the global setting for whether tool windows may be placed in a document state.

public bool ToolWindowsCanBecomeDocuments { get; set; }

Property Value

bool:

true if tool windows may be placed in a document state; otherwise, false.

Remarks

This setting only affects tool windows whose CanBecomeDocument property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanClose

Gets or sets the global setting for whether tool windows can be closed.

public bool ToolWindowsCanClose { get; set; }

Property Value

bool:

true if tool windows can be closed; otherwise, false.

Remarks

This setting only affects tool windows whose CanClose property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanDockHostBottom

Gets or sets the global setting for whether tool windows may be docked to the bottom of the host container control.

public bool ToolWindowsCanDockHostBottom { get; set; }

Property Value

bool:

true if tool windows may be docked to the bottom of the host container control; otherwise, false.

Remarks

This setting only affects tool windows whose CanDockHostBottom property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanDockHostLeft

Gets or sets the global setting for whether tool windows may be docked to the left of the host container control.

public bool ToolWindowsCanDockHostLeft { get; set; }

Property Value

bool:

true if tool windows may be docked to the left of the host container control; otherwise, false.

Remarks

This setting only affects tool windows whose CanDockHostLeft property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanDockHostRight

Gets or sets the global setting for whether tool windows may be docked to the right of the host container control.

public bool ToolWindowsCanDockHostRight { get; set; }

Property Value

bool:

true if tool windows may be docked to the right of the host container control; otherwise, false.

Remarks

This setting only affects tool windows whose CanDockHostRight property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanDockHostTop

Gets or sets the global setting for whether tool windows may be docked to the top of the host container control.

public bool ToolWindowsCanDockHostTop { get; set; }

Property Value

bool:

true if tool windows may be docked to the top of the host container control; otherwise, false.

Remarks

This setting only affects tool windows whose CanDockHostTop property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanDrag

Gets or sets the global setting for whether tool windows may be dragged to another location.

public bool ToolWindowsCanDrag { get; set; }

Property Value

bool:

true if tool windows may be dragged to another location; otherwise, false.

Remarks

This setting only affects tool windows whose CanDrag property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanFloat

Gets or sets the global setting for whether tool windows may be contained in a floating window.

public bool ToolWindowsCanFloat { get; set; }

Property Value

bool:

true if tool windows may be contained in a floating window; otherwise, false.

Remarks

This setting only affects tool windows whose CanFloat property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsCanResize

Gets or sets the global setting for whether tool windows may be resized.

public bool ToolWindowsCanResize { get; set; }

Property Value

bool:

true if tool windows may be resized; otherwise, false.

Remarks

This setting only affects tool windows whose CanResize property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsHaveOptions

Gets or sets the global setting for whether tool windows have more options available than the standard options.

public bool ToolWindowsHaveOptions { get; set; }

Property Value

bool:

true if tool windows have more options available than the standard options; otherwise, false.

Remarks

This setting only affects tool windows whose HasOptions property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

ToolWindowsHaveTitleBars

Gets or sets the global setting for whether tool windows display a title bar when docked.

public bool ToolWindowsHaveTitleBars { get; set; }

Property Value

bool:

true if tool windows display a title bar when docked; otherwise, false.

Remarks

This setting only affects tool windows whose HasTitleBar property is set to DefaultableBoolean.Default. Any other setting on the tool window instance overrides this global setting.

UnknownToolWindowStatePreservationEnabled

Gets or sets whether the DockManager will persist layout information for unknown tool windows when loading a layout.

public bool UnknownToolWindowStatePreservationEnabled { get; set; }

Property Value

bool:

true if the DockManager will persist layout information for unknown tool windows when loading a layout; otherwise, false.

Methods

ActivateAllInactiveToolWindows()

Activates all inactive tool windows.

public void ActivateAllInactiveToolWindows()

AutoHideAllToolWindowsDockedInHost()

Auto-hides all active tool windows that are docked within the host container.

public void AutoHideAllToolWindowsDockedInHost()

CascadeDocuments()

Cascades the active documents while in Standard MDI mode.

public void CascadeDocuments()

CloseAllActiveDocuments(bool)

Closes all active documents, which are any tool or document windows currently active in the MDI area.

public void CloseAllActiveDocuments(bool force)
Parameter Type Description
force bool

Whether to force the windows to close, even if the close operation is cancelled in the WindowClosing event.

CloseAllActiveDocuments(bool, TabbedMdiWindowCloseReason)

Closes all active documents, which are any tool or document windows currently active in the MDI area.

public void CloseAllActiveDocuments(bool force, TabbedMdiWindowCloseReason reason)
Parameter Type Description
force bool

Whether to force the windows to close, even if the close operation is cancelled in the WindowClosing event.

reason TabbedMdiWindowCloseReason

A TabbedMdiWindowCloseReason that specifies why the window was closed.

CloseAllActiveToolWindows(bool)

Closes all active tool windows.

public void CloseAllActiveToolWindows(bool force)
Parameter Type Description
force bool

Whether to force the tool windows to close, even if the close operation is cancelled in the WindowClosing event.

CloseAllActiveToolWindows(bool, TabbedMdiWindowCloseReason)

Closes all active tool windows.

public void CloseAllActiveToolWindows(bool force, TabbedMdiWindowCloseReason reason)
Parameter Type Description
force bool

Whether to force the tool windows to close, even if the close operation is cancelled in the WindowClosing event.

reason TabbedMdiWindowCloseReason

A TabbedMdiWindowCloseReason that specifies why the window was closed.

CloseAllButSelectedActiveDocuments()

Closes all active documents, which are any tool or document windows currently active in the MDI area, except for the SelectedDocument.

public void CloseAllButSelectedActiveDocuments()

CloseAllButSelectedActiveDocuments(TabbedMdiWindowCloseReason)

Closes all active documents, which are any tool or document windows currently active in the MDI area, except for the SelectedDocument.

public void CloseAllButSelectedActiveDocuments(TabbedMdiWindowCloseReason reason)
Parameter Type Description
reason TabbedMdiWindowCloseReason

A TabbedMdiWindowCloseReason that specifies why the window was closed.

Dispose(bool)

Disposes any resources used by the object.

protected override void Dispose(bool disposing)
Parameter Type Description
disposing bool

Whether the object is being disposed.

ExecuteTabbedMdiWindowContextMenuItem(TabbedMdiWindow, TabbedMdiWindowContextMenuItemType)

Executes the command associated with a context menu of a tabbed MDI window.

public virtual void ExecuteTabbedMdiWindowContextMenuItem(TabbedMdiWindow tabbedMdiWindow, TabbedMdiWindowContextMenuItemType menuItemType)
Parameter Type Description
tabbedMdiWindow TabbedMdiWindow

The tabbed MDI window to which the command will be applied.

menuItemType TabbedMdiWindowContextMenuItemType

The context menu item type to be executed.

Exceptions

Type Condition
ArgumentNullException

Thrown if tabbedMdiWindow is null.

InvalidOperationException

Thrown if the context menu item is invalid for a window (e.g. a tool window command executed against a document window).

GetToolWindowLayoutData(bool)

Returns the current layout of all the tool windows managed by this DockManager.

public XmlDocument GetToolWindowLayoutData(bool saveTextProperties)
Parameter Type Description
saveTextProperties bool

Whether to save the text properties of the tool windows.

Returns

XmlDocument:

An XmlDocument containing the layout data of the current tool window layout.

HideVisibleAutoHideToolWindow(bool)

Hides the currently displayed auto-hide tool window, if any.

public bool HideVisibleAutoHideToolWindow(bool instantaneous)
Parameter Type Description
instantaneous bool

Whether to instantly hide the tool window (without animation).

Returns

bool

Remarks

true if a tool window was hidden; otherwise, false.

IsMenuItemEnabled(DockManagerMenuItemType)

Returns whether the specified type of menu item should be enabled for the manager.

public virtual bool IsMenuItemEnabled(DockManagerMenuItemType menuItemType)
Parameter Type Description
menuItemType DockManagerMenuItemType

A DockManagerMenuItemType specifying the type of menu item to examine.

Returns

bool:

true if the menu item type should be enabled; otherwise, false.

IsMenuItemVisible(DockManagerMenuItemType)

Returns whether the specified type of menu item should be visible for the manager.

public virtual bool IsMenuItemVisible(DockManagerMenuItemType menuItemType)
Parameter Type Description
menuItemType DockManagerMenuItemType

A DockManagerMenuItemType specifying the type of menu item to examine.

Returns

bool:

true if the menu item type should be visible; otherwise, false.

LoadDocumentLayoutFromFile(string)

Load tabbed MDI document layout data from a layout data file.

public void LoadDocumentLayoutFromFile(string path)
Parameter Type Description
path string

Path to the tabbed MDI document layout data file.

Remarks

This method may throw an exception if the file is not found or if the layout data is invalid.

LoadToolWindowLayoutFromFile(string)

Load tool window layout data from a layout data file.

public void LoadToolWindowLayoutFromFile(string path)
Parameter Type Description
path string

Path to the tool window layout data file.

Remarks

This method may throw an exception if the file is not found or if the layout data is invalid.

OnActiveFilesContextMenu(TabbedMdiWindowContextMenuEventArgs)

Raises the ActiveFilesContextMenu event.

protected virtual void OnActiveFilesContextMenu(TabbedMdiWindowContextMenuEventArgs e)
Parameter Type Description
e TabbedMdiWindowContextMenuEventArgs

A TabbedMdiWindowContextMenuEventArgs that contains the event data.

OnAutoHideToolWindowDisplaying(TabbedMdiWindowEventArgs)

Raises the AutoHideToolWindowDisplaying event.

protected virtual void OnAutoHideToolWindowDisplaying(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnAutoHideToolWindowHiding(TabbedMdiWindowEventArgs)

Raises the AutoHideToolWindowHiding event.

protected virtual void OnAutoHideToolWindowHiding(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnSelectedDocumentChanged(TabbedMdiWindowEventArgs)

Raises the SelectedDocumentChanged event.

protected virtual void OnSelectedDocumentChanged(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnSelectedTabbedMdiContainerChanged(EventArgs)

protected virtual void OnSelectedTabbedMdiContainerChanged(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnToolWindowDragged(EventArgs)

Raises the ToolWindowDragged event.

protected virtual void OnToolWindowDragged(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnToolWindowDragging(CancelEventArgs)

Raises the ToolWindowDragging event.

protected virtual void OnToolWindowDragging(CancelEventArgs e)
Parameter Type Description
e CancelEventArgs

A CancelEventArgs that contains the event data.

OnToolWindowLayoutLoaded(EventArgs)

Raises the ToolWindowLayoutLoaded event.

protected virtual void OnToolWindowLayoutLoaded(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnToolWindowLayoutLoading(EventArgs)

Raises the ToolWindowLayoutLoading event.

protected virtual void OnToolWindowLayoutLoading(EventArgs e)
Parameter Type Description
e EventArgs

An EventArgs that contains the event data.

OnWindowActivated(TabbedMdiWindowEventArgs)

Raises the WindowActivated event.

protected virtual void OnWindowActivated(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnWindowActivating(TabbedMdiWindowEventArgs)

Raises the WindowActivating event.

protected virtual void OnWindowActivating(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnWindowClosed(TabbedMdiWindowEventArgs)

Raises the WindowClosed event.

protected virtual void OnWindowClosed(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnWindowClosing(TabbedMdiWindowClosingEventArgs)

Raises the WindowClosing event.

protected virtual void OnWindowClosing(TabbedMdiWindowClosingEventArgs e)
Parameter Type Description
e TabbedMdiWindowClosingEventArgs

A TabbedMdiWindowClosingEventArgs that contains the event data.

OnWindowContextMenu(TabbedMdiWindowContextMenuEventArgs)

Raises the WindowContextMenu event.

protected virtual void OnWindowContextMenu(TabbedMdiWindowContextMenuEventArgs e)
Parameter Type Description
e TabbedMdiWindowContextMenuEventArgs

A TabbedMdiWindowContextMenuEventArgs that contains the event data.

OnWindowCreated(TabbedMdiWindowEventArgs)

Raises the WindowCreated event.

protected virtual void OnWindowCreated(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnWindowDisposed(TabbedMdiWindowEventArgs)

Raises the WindowDisposed event.

protected virtual void OnWindowDisposed(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnWindowFocused(TabbedMdiWindowEventArgs)

Raises the WindowFocused event.

protected virtual void OnWindowFocused(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnWindowInitializing(TabbedMdiWindowEventArgs)

Raises the WindowInitializing event.

protected virtual void OnWindowInitializing(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

OnWindowTabToolTipDisplaying(TabbedMdiWindowEventArgs)

Raises the WindowTabToolTipDisplaying event.

protected virtual void OnWindowTabToolTipDisplaying(TabbedMdiWindowEventArgs e)
Parameter Type Description
e TabbedMdiWindowEventArgs

A TabbedMdiWindowEventArgs that contains the event data.

RequestShowDragDropTarget(Rectangle, DockHintStyle, DockStyle)

Sends a request to the designer for a drop target to be drawn.

public void RequestShowDragDropTarget(Rectangle screenBounds, DockHintStyle dockHintStyle, DockStyle frameStyle)
Parameter Type Description
screenBounds Rectangle

The bounds of the drop target, or Empty to hide the drop target.

dockHintStyle DockHintStyle

A DockHintStyle indicating the style of drop target to draw.

frameStyle DockStyle

A DockStyle indicating the style of frame to draw.

SaveDocumentLayoutToFile(string)

Saves the current layout of all the tabbed MDI documents managed by this DockManager to a layout data file.

public void SaveDocumentLayoutToFile(string path)
Parameter Type Description
path string

Path to the tabbed MDI document layout data file.

Remarks

The output layout data is stored in XML format.

SaveToolWindowLayoutToFile(string)

Saves the current layout of all the tool windows managed by this DockManager to a layout data file.

public void SaveToolWindowLayoutToFile(string path)
Parameter Type Description
path string

Path to the tool window layout data file.

Remarks

The output layout data is stored in XML format.

SaveToolWindowLayoutToFile(string, bool)

Saves the current layout of all the tool windows managed by this DockManager to a layout data file.

public void SaveToolWindowLayoutToFile(string path, bool saveTextProperties)
Parameter Type Description
path string

Path to the tool window layout data file.

saveTextProperties bool

Whether to save the text properties of the tool windows.

Remarks

The output layout data is stored in XML format.

ShowNextWindowNavForm(Keys, bool, bool)

Show the Next Window Navigation Form.

public bool ShowNextWindowNavForm(Keys keys, bool toolWindowMode, bool selectNext)
Parameter Type Description
keys Keys

The modifier Keys that when released, will hide the next window nav form, typically Control or Alt.

toolWindowMode bool

Whether to be in tool window mode.

selectNext bool

Whether to select the next item.

Returns

bool:

true if the key should be handled; otherwise, false.

TabbedMdiWindowFromControl(Control)

Returns the TabbedMdiWindow, if any, that contains the specified Control.

public static TabbedMdiWindow TabbedMdiWindowFromControl(Control control)
Parameter Type Description
control Control

The Control to check.

Returns

TabbedMdiWindow:

The TabbedMdiWindow, if any, that contains the specified Control.

TileDocumentsHorizontally()

Tiles the active documents horizontally while in Standard MDI mode.

public void TileDocumentsHorizontally()

TileDocumentsVertically()

Tiles the active documents vertically while in Standard MDI mode.

public void TileDocumentsVertically()

UnknownToolWindowStatePreservationInfoExistsFor(string)

Returns whether unknown tool window layout information is available for a tool window with the specified key.

public bool UnknownToolWindowStatePreservationInfoExistsFor(string key)
Parameter Type Description
key string

The key for which to search.

Returns

bool:

true if layout information is available; otherwise, false.

Events

ActiveFilesContextMenu

Occurs when using tabbed MDI and the Active Files button is clicked, requesting a drop-down menu of open files.

public event TabbedMdiWindowContextMenuEventHandler ActiveFilesContextMenu

Event Type

TabbedMdiWindowContextMenuEventHandler

Remarks

Set the Cancel member of the event arguments to true if the default context menu should not be displayed. This is useful when displaying custom menus. The TabbedMdiWindow member of the event arguments indicates the currently selected TabbedMdiWindow in the tabbed MDI container of which the button was pressed.

AutoHideToolWindowDisplaying

Occurs before a tool window in auto-hide mode is displayed.

public event TabbedMdiWindowEventHandler AutoHideToolWindowDisplaying

Event Type

TabbedMdiWindowEventHandler

AutoHideToolWindowHiding

Occurs before a tool window in auto-hide mode is hidden.

public event TabbedMdiWindowEventHandler AutoHideToolWindowHiding

Event Type

TabbedMdiWindowEventHandler

LoadCustomToolWindowLayoutData

Occurs as a tool window layout is being read, allowing for custom data to be loaded.

public event DockLoadCustomToolWindowLayoutDataEventHandler LoadCustomToolWindowLayoutData

Event Type

DockLoadCustomToolWindowLayoutDataEventHandler

Remarks

Use the Reader property to enumerate through the custom XML data found in the layout stream.

NextWindowNavigationActiveChanged

Occurs when the Next Window Navigation form either shows or hides.

public event EventHandler NextWindowNavigationActiveChanged

Event Type

EventHandler

Remarks

Examine the NextWindowNavigationActive property to determine if the form is currently visible.

NextWindowNavigationSelectionChanged

Occurs when the selection changes on the Next Window Navigation form.

public event NextWindowNavigationEventHandler NextWindowNavigationSelectionChanged

Event Type

NextWindowNavigationEventHandler

Remarks

Use the event argument properties to customize the text to display for the current selection on the Next Window Navigation form.

SaveCustomToolWindowLayoutData

Occurs as a tool window layout is being written, allowing for custom data to be saved.

public event DockSaveCustomToolWindowLayoutDataEventHandler SaveCustomToolWindowLayoutData

Event Type

DockSaveCustomToolWindowLayoutDataEventHandler

Remarks

Use the Writer property to write custom XML data to the layout stream.

SelectedDocumentChanged

Occurs when the value of the SelectedDocument property changes.

public event TabbedMdiWindowEventHandler SelectedDocumentChanged

Event Type

TabbedMdiWindowEventHandler

SelectedTabbedMdiContainerChanged

Occurs after the selected tabbed MDI container is changed.

public event EventHandler SelectedTabbedMdiContainerChanged

Event Type

EventHandler

ToolWindowDragged

Occurs after one or more tool windows are dragged by the user.

public event EventHandler ToolWindowDragged

Event Type

EventHandler

ToolWindowDragging

Occurs before one or more tool windows are dragged by the user.

public event CancelEventHandler ToolWindowDragging

Event Type

CancelEventHandler

ToolWindowLayoutLoaded

Occurs after tool window layout is loaded.

public event EventHandler ToolWindowLayoutLoaded

Event Type

EventHandler

Remarks

This event is raised after a call to LoadToolWindowLayoutFromFile(string) or by setting the ToolWindowLayoutData property.

ToolWindowLayoutLoading

Occurs before tool window layout is loaded.

public event EventHandler ToolWindowLayoutLoading

Event Type

EventHandler

Remarks

This event is raised after a call to LoadToolWindowLayoutFromFile(string) or by setting the ToolWindowLayoutData property.

WindowActivated

Occurs after a window is activated from an inactive state and is visible.

public event TabbedMdiWindowEventHandler WindowActivated

Event Type

TabbedMdiWindowEventHandler

WindowActivating

Occurs before a window is activated from an inactive state.

public event TabbedMdiWindowEventHandler WindowActivating

Event Type

TabbedMdiWindowEventHandler

WindowClosed

Occurs after a window is deactivated from an active state.

public event TabbedMdiWindowEventHandler WindowClosed

Event Type

TabbedMdiWindowEventHandler

WindowClosing

Occurs before a window is deactivated from an active state.

public event TabbedMdiWindowClosingEventHandler WindowClosing

Event Type

TabbedMdiWindowClosingEventHandler

WindowContextMenu

Occurs when a window needs a context menu displayed.

public event TabbedMdiWindowContextMenuEventHandler WindowContextMenu

Event Type

TabbedMdiWindowContextMenuEventHandler

Remarks

Set the Cancel member of the event arguments to true if the default context menu should not be displayed. This is useful when displaying custom menus.

WindowCreated

Occurs immediately after a window is created.

public event TabbedMdiWindowEventHandler WindowCreated

Event Type

TabbedMdiWindowEventHandler

Remarks

This event is only called once during the lifetime of the window.

WindowDisposed

Occurs when a window is disposed.

public event TabbedMdiWindowEventHandler WindowDisposed

Event Type

TabbedMdiWindowEventHandler

Remarks

This event is only called once during the lifetime of the window.

WindowFocused

Occurs after a window receives focus.

public event TabbedMdiWindowEventHandler WindowFocused

Event Type

TabbedMdiWindowEventHandler

WindowInitializing

Occurs before the window is activated for the first time, allowing for lazy initialization of the window.

public event TabbedMdiWindowEventHandler WindowInitializing

Event Type

TabbedMdiWindowEventHandler

Remarks

After this event is raised for a window, the window's IsInitialized property is set to true. This event is only called once during the lifetime of the window.

WindowTabToolTipDisplaying

Occurs before a tool tip is displayed for a window tab and gives an opportunity to update the windows's tool tip text.

public event TabbedMdiWindowEventHandler WindowTabToolTipDisplaying

Event Type

TabbedMdiWindowEventHandler

Inherited Members