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 an instance of the class.
public DockManager()
DockManager(IContainer)
Initializes an instance of the class.
public DockManager(IContainer container)
| Parameter | Type | Description |
|---|---|---|
| container | IContainer | An IContainer that represents the container for the component. |
Properties
ActiveDocuments
The collection of active TabbedMdiWindow controls in the MDI area.
[Browsable(false)]
public TabbedMdiWindowCollection ActiveDocuments { get; }
Property Value
AutoCreateToolWindowsForLayoutLoad
Indicates 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:
trueif tool windows should be automatically created; otherwise,false.
AutoHideButtonAffectsSelectedTabOnly
Indicates whether the pressing of the auto-hide button affects the selected tab only.
public bool AutoHideButtonAffectsSelectedTabOnly { get; set; }
Property Value
- bool:
trueif the pressing of the auto-hide button affects the selected tab only; otherwise,false.
AutoHideCloseDelay
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 default value is
1000milliseconds, or1second.
AutoHideCommand
The command that is used for auto-hide.
AutoHideHideSteps
The number of steps to use for animation when hiding auto-hide tool windows.
public int AutoHideHideSteps { get; set; }
Property Value
- int:
The default value is
10.
Remarks
Set this value to 1 for instantaneous hiding.
AutoHideShowOnMouseHover
Indicates whether to show auto-hidden tool windows when the mouse hovers over their tabs.
public bool AutoHideShowOnMouseHover { get; set; }
Property Value
- bool:
trueif 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
The number of steps to use for animation when showing auto-hide tool windows.
public int AutoHideShowSteps { get; set; }
Property Value
- int:
The default value is
10.
Remarks
Set this value to 1 for instantaneous showing.
AutoHideTabStripPanelBottom
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
AutoHideTabStripPanelLeft
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
AutoHideTabStripPanelRight
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
AutoHideTabStripPanelTop
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
AutoSelectTabOnDragOver
Indicates whether to automatically select a TabbedMdiWindow when a drag operation is moved over its tab.
public bool AutoSelectTabOnDragOver { get; set; }
Property Value
- bool:
trueif a TabbedMdiWindow should be automatically selected when a drag operation is moved over its tab; otherwise,false.
CloseButtonAffectsSelectedTabOnly
Indicates whether the pressing of the close button affects the selected tab only.
public bool CloseButtonAffectsSelectedTabOnly { get; set; }
Property Value
- bool:
trueif the pressing of the close button affects the selected tab only; otherwise,false.
CloseCommand
The command that is used for a close.
DefaultMdiWindowState
The default FormWindowState to assign to MDI windows when they are created.
DisposeDocumentWindowsAfterClose
Indicates whether to automatically dispose DocumentWindow objects after they are closed.
public bool DisposeDocumentWindowsAfterClose { get; set; }
Property Value
- bool:
trueif DocumentWindow objects should be automatically disposed after they are closed; otherwise,false.
DockGuideStyle
A DockGuideStyle indicating the style of dock guides to use.
DockHintStyle
A DockHintStyle indicating the style of docking hints to use.
DockObjectType
A DockObjectType specifying the type of dock object.
DockRenderer
The IDockRenderer used to render the dock controls.
DockRendererResolved
The IDockRenderer used to render the dock controls.
[Browsable(false)]
public IDockRenderer DockRendererResolved { get; }
Property Value
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
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
XmlDocumentcontaining 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
The DocumentMdiStyle indicating the type of MDI to use for documents.
DocumentWindows
The collection of DocumentWindow controls being managed by this DockManager.
[Browsable(false)]
public DocumentWindowCollection DocumentWindows { get; }
Property Value
DocumentWindowsCanClose
The global setting for whether document windows can be closed.
public bool DocumentWindowsCanClose { get; set; }
Property Value
- bool:
trueif document windows can be closed; otherwise,false.
Remarks
This setting only affects document windows whose CanClose property is set to Default. Any other setting on the document window instance overrides this global setting.
DocumentWindowsCanFloat
The global setting for whether document windows may be contained in a floating window.
public bool DocumentWindowsCanFloat { get; set; }
Property Value
- bool:
trueif document windows may be contained in a floating window; otherwise,false.
Remarks
This setting only affects document windows whose CanFloat property is set to Default. Any other setting on the tool window instance overrides this global setting.
FocusedTabbedMdiWindow
The TabbedMdiWindow that currently contains the focus.
public TabbedMdiWindow? FocusedTabbedMdiWindow { get; }
Property Value
- TabbedMdiWindow:
A null reference is returned if no window currently has the focus.
FocusedToolWindow
The ToolWindow that currently contains the focus.
[Browsable(false)]
public ToolWindow? FocusedToolWindow { get; }
Property Value
- ToolWindow:
A null reference is returned if no tool window currently has the focus.
HideAutoHideToolWindowsAfterStateChange
Indicates whether to hide auto-hide tool windows immediately after a state change.
public bool HideAutoHideToolWindowsAfterStateChange { get; set; }
Property Value
- bool:
trueif the auto-hide windows should be hidden; otherwise,false.
HideUnfocusedAutoHideToolWindowsOnMouseLeave
Indicates whether to hide unfocused auto-hide tool windows that are displayed when the mouse leaves them.
public bool HideUnfocusedAutoHideToolWindowsOnMouseLeave { get; set; }
Property Value
- bool:
trueif the unfocused auto-hide windows should be hidden; otherwise,false.
HostContainerControl
The ContainerControl that should be used as the topmost parent for docking.
IgnoreAutoHideMouseClicks
Indicates whether to ignore mouse clicks that would hide a displayed auto-hide window.
public bool IgnoreAutoHideMouseClicks { get; set; }
Property Value
- bool:
trueif mouse clicks outside a displayed auto-hide window should close it; otherwise,false.
ImageList
The ImageList used for item images.
public ImageList? ImageList { get; set; }
Property Value
- ImageList:
The default value is a null reference.
KeyboardNavigationEnabled
Indicates whether keyboard navigation is enabled when the NextWindowNavigationEnabled is false.
public bool KeyboardNavigationEnabled { get; set; }
Property Value
- bool:
trueif keyboard navigation is enabled when the NextWindowNavigationEnabled isfalse; otherwise,false.
Remarks
If NextWindowNavigationEnabled is false and keyboard navigation is enabled,
the Ctrl+Tab and Ctrl+Shift+Tab keys will switch documents.
MagnetismGapDistance
The distance between windows that are snapped together via magnetism.
public int MagnetismGapDistance { get; set; }
Property Value
- int:
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
The distance at which magnetism begins to snap windows being dragged.
public int MagnetismSnapDistance { get; set; }
Property Value
- int:
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
Indicates whether multiple tabbed MDI groups are enabled.
public bool MultipleTabbedMdiGroupsEnabled { get; set; }
Property Value
- bool:
trueif 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
Indicates 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:
trueif next window navigation is currently active; otherwise,false.
NextWindowNavigationEnabled
Indicates whether next window navigation is enabled.
public bool NextWindowNavigationEnabled { get; set; }
Property Value
- bool:
trueif 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
A NextWindowNavigationType indicating the type of Next Window Navigation functionality to provide.
public NextWindowNavigationType NextWindowNavigationType { get; set; }
Property Value
OptionsCommand
The command that is used for more options.
SelectedDocument
The TabbedMdiWindow that is currently selected.
StandardMdiAutoWindowLayoutEnabled
Indicates 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:
trueif new windows that display in standard MDI will be automatically positioned; otherwise,false.
TabbedMdiContainerButtonStyle
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
The control-specific ITabStripRenderer to use for drawing the TabStrip controls in tabbed MDI containers.
public ITabStripRenderer? TabbedMdiContainerTabStripRenderer { get; set; }
Property Value
TabbedMdiContainerTabStripRendererResolved
The ITabStripRenderer used for drawing the TabStrip controls in tabbed MDI containers.
[Browsable(false)]
public ITabStripRenderer TabbedMdiContainerTabStripRendererResolved { get; }
Property Value
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
Indicates whether tabbed MDI tabs support drag/drop.
public bool TabbedMdiDragDropEnabled { get; set; }
Property Value
- bool:
trueif tabbed MDI tabs support drag/drop; otherwise,false.
TabbedMdiMaximumTabExtent
The maximum extent of an MDI tab.
TabbedMdiRightClickSelectsTab
Indicates whether a right-click on a tab selects the related page.
public bool TabbedMdiRightClickSelectsTab { get; set; }
Property Value
- bool:
trueif a right-click on a tab selects the related page; otherwise,false.
TabbedMdiRootContainer
The TabbedMdiRootContainer that is currently in use.
[Browsable(false)]
public TabbedMdiRootContainer? TabbedMdiRootContainer { get; }
Property Value
Remarks
This property only returns a value if the DocumentMdiStyle is Tabbed.
TabbedMdiSingleTabVisible
Indicates whether an MDI tab should still be visible if there is only one document open.
public bool TabbedMdiSingleTabVisible { get; set; }
Property Value
- bool:
trueif the tab should be visible; otherwise,false.
TabbedMdiTabImagesVisible
Indicates whether images should be displayed in tabbed MDI window tabs.
public bool TabbedMdiTabImagesVisible { get; set; }
Property Value
- bool:
trueif images should be displayed in tabbed MDI window tabs; otherwise,false.
TabbedMdiTabsAlignNear
Indicates 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:
trueif the tabs in tabbed MDI should align on the near side of the tab container; otherwise,false.
TabbedMdiWindowsInsertAtEnd
Indicates 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:
trueif new windows placed in the tabbed MDI area insert at the end of the current tab group; otherwise,false.
ToolWindowContainerTabStripRenderer
The control-specific ITabStripRenderer to use for drawing the TabStrip controls in tool window containers.
public ITabStripRenderer? ToolWindowContainerTabStripRenderer { get; set; }
Property Value
ToolWindowContainerTabStripRendererResolved
The ITabStripRenderer used for drawing the TabStrip controls in tool window containers.
[Browsable(false)]
public ITabStripRenderer ToolWindowContainerTabStripRendererResolved { get; }
Property Value
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
The current layout of all the tool windows managed by this DockManager.
[Browsable(false)]
public XmlDocument ToolWindowLayoutData { get; set; }
Property Value
- XmlDocument:
An
XmlDocumentcontaining 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
Indicates whether tool windows should be forced back onto a visible Screen when undocked.
public bool ToolWindowScreenBoundsCheckEnabled { get; set; }
Property Value
- bool:
trueif tool windows should be forced back onto a visibleScreenwhen undocked; otherwise,false.
ToolWindows
The collection of ToolWindow controls being managed by this DockManager.
[Browsable(false)]
public ToolWindowCollection ToolWindows { get; }
Property Value
ToolWindowsCanAttach
The global setting for whether tool windows may be attached to another tool window.
public bool ToolWindowsCanAttach { get; set; }
Property Value
- bool:
trueif tool windows may be attached to another tool window; otherwise,false.
Remarks
This setting only affects tool windows whose CanAttach property is set to Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanAutoHide
The global setting for whether tool windows may be placed in auto-hide mode.
public bool ToolWindowsCanAutoHide { get; set; }
Property Value
- bool:
trueif tool windows may be placed in auto-hide mode; otherwise,false.
Remarks
This setting only affects tool windows whose CanAutoHide property is set to Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanBecomeDocuments
The global setting for whether tool windows may be placed in a document state.
public bool ToolWindowsCanBecomeDocuments { get; set; }
Property Value
- bool:
trueif tool windows may be placed in a document state; otherwise,false.
Remarks
This setting only affects tool windows whose CanBecomeDocument property is set to Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanClose
The global setting for whether tool windows can be closed.
public bool ToolWindowsCanClose { get; set; }
Property Value
- bool:
trueif tool windows can be closed; otherwise,false.
Remarks
This setting only affects tool windows whose CanClose property is set to Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanDockHostBottom
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:
trueif 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 Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanDockHostLeft
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:
trueif 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 Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanDockHostRight
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:
trueif 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 Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanDockHostTop
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:
trueif 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 Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanDrag
The global setting for whether tool windows may be dragged to another location.
public bool ToolWindowsCanDrag { get; set; }
Property Value
- bool:
trueif tool windows may be dragged to another location; otherwise,false.
Remarks
This setting only affects tool windows whose CanDrag property is set to Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanFloat
The global setting for whether tool windows may be contained in a floating window.
public bool ToolWindowsCanFloat { get; set; }
Property Value
- bool:
trueif tool windows may be contained in a floating window; otherwise,false.
Remarks
This setting only affects tool windows whose CanFloat property is set to Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsCanResize
The global setting for whether tool windows may be resized.
public bool ToolWindowsCanResize { get; set; }
Property Value
- bool:
trueif tool windows may be resized; otherwise,false.
Remarks
This setting only affects tool windows whose CanResize property is set to Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsHaveOptions
The global setting for whether tool windows have more options available than the standard options.
public bool ToolWindowsHaveOptions { get; set; }
Property Value
- bool:
trueif 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 Default. Any other setting on the tool window instance overrides this global setting.
ToolWindowsHaveTitleBars
The global setting for whether tool windows display a title bar when docked.
public bool ToolWindowsHaveTitleBars { get; set; }
Property Value
- bool:
trueif tool windows display a title bar when docked; otherwise,false.
Remarks
This setting only affects tool windows whose HasTitleBar property is set to Default. Any other setting on the tool window instance overrides this global setting.
UnknownToolWindowStatePreservationEnabled
Indicates whether the DockManager will persist layout information for unknown tool windows when loading a layout.
public bool UnknownToolWindowStatePreservationEnabled { get; set; }
Property Value
- bool:
trueif 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)
Releases the unmanaged resources used by the Component and optionally releases the managed resources.
protected override void Dispose(bool disposing)
| Parameter | Type | Description |
|---|---|---|
| disposing | bool |
|
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 |
| 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
XmlDocumentcontaining 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
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:
trueif 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:
trueif the menu item type should be visible; otherwise,false.
LoadDocumentLayoutFromFile(string)
Loads 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)
Loads 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 | The event data. |
OnAutoHideToolWindowDisplaying(TabbedMdiWindowEventArgs)
Raises the AutoHideToolWindowDisplaying event.
protected virtual void OnAutoHideToolWindowDisplaying(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnAutoHideToolWindowHiding(TabbedMdiWindowEventArgs)
Raises the AutoHideToolWindowHiding event.
protected virtual void OnAutoHideToolWindowHiding(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnSelectedDocumentChanged(TabbedMdiWindowEventArgs)
Raises the SelectedDocumentChanged event.
protected virtual void OnSelectedDocumentChanged(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnSelectedTabbedMdiContainerChanged(EventArgs)
Raises the SelectedTabbedMdiContainerChanged event.
protected virtual void OnSelectedTabbedMdiContainerChanged(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnToolWindowDragged(EventArgs)
Raises the ToolWindowDragged event.
protected virtual void OnToolWindowDragged(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnToolWindowDragging(CancelEventArgs)
Raises the ToolWindowDragging event.
protected virtual void OnToolWindowDragging(CancelEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | CancelEventArgs | The event data. |
OnToolWindowLayoutLoaded(EventArgs)
Raises the ToolWindowLayoutLoaded event.
protected virtual void OnToolWindowLayoutLoaded(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnToolWindowLayoutLoading(EventArgs)
Raises the ToolWindowLayoutLoading event.
protected virtual void OnToolWindowLayoutLoading(EventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | EventArgs | The event data. |
OnWindowActivated(TabbedMdiWindowEventArgs)
Raises the WindowActivated event.
protected virtual void OnWindowActivated(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnWindowActivating(TabbedMdiWindowEventArgs)
Raises the WindowActivating event.
protected virtual void OnWindowActivating(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnWindowClosed(TabbedMdiWindowEventArgs)
Raises the WindowClosed event.
protected virtual void OnWindowClosed(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnWindowClosing(TabbedMdiWindowClosingEventArgs)
Raises the WindowClosing event.
protected virtual void OnWindowClosing(TabbedMdiWindowClosingEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowClosingEventArgs | The event data. |
OnWindowContextMenu(TabbedMdiWindowContextMenuEventArgs)
Raises the WindowContextMenu event.
protected virtual void OnWindowContextMenu(TabbedMdiWindowContextMenuEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowContextMenuEventArgs | The event data. |
OnWindowCreated(TabbedMdiWindowEventArgs)
Raises the WindowCreated event.
protected virtual void OnWindowCreated(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnWindowDisposed(TabbedMdiWindowEventArgs)
Raises the WindowDisposed event.
protected virtual void OnWindowDisposed(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnWindowFocused(TabbedMdiWindowEventArgs)
Raises the WindowFocused event.
protected virtual void OnWindowFocused(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnWindowInitializing(TabbedMdiWindowEventArgs)
Raises the WindowInitializing event.
protected virtual void OnWindowInitializing(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | The event data. |
OnWindowTabToolTipDisplaying(TabbedMdiWindowEventArgs)
Raises the WindowTabToolTipDisplaying event.
protected virtual void OnWindowTabToolTipDisplaying(TabbedMdiWindowEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | TabbedMdiWindowEventArgs | 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, 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 = true)
| 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 |
| toolWindowMode | bool | Whether to be in tool window mode. |
| selectNext | bool | Whether to select the next item. |
Returns
- bool:
trueif 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
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:
trueif 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
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
AutoHideToolWindowHiding
Occurs before a tool window in auto-hide mode is hidden.
public event TabbedMdiWindowEventHandler? AutoHideToolWindowHiding
Event Type
LoadCustomToolWindowLayoutData
Occurs as a tool window layout is being read, allowing for custom data to be loaded.
public event DockLoadCustomToolWindowLayoutDataEventHandler? LoadCustomToolWindowLayoutData
Event Type
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
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
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
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
SelectedTabbedMdiContainerChanged
Occurs after the selected tabbed MDI container is changed.
ToolWindowDragged
Occurs after one or more tool windows are dragged by the user.
ToolWindowDragging
Occurs before one or more tool windows are dragged by the user.
ToolWindowLayoutLoaded
Occurs after tool window layout is loaded.
public event EventHandler? ToolWindowLayoutLoaded
Event Type
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
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.
WindowActivating
Occurs before a window is activated from an inactive state.
WindowClosed
Occurs after a window is deactivated from an active state.
WindowClosing
Occurs before a window is deactivated from an active state.
public event TabbedMdiWindowClosingEventHandler? WindowClosing
Event Type
WindowContextMenu
Occurs when a window needs a context menu displayed.
public event TabbedMdiWindowContextMenuEventHandler? WindowContextMenu
Event Type
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
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
Remarks
This event is only called once during the lifetime of the window.
WindowFocused
Occurs after a window receives focus.
WindowInitializing
Occurs before the window is activated for the first time, allowing for lazy initialization of the window.
public event TabbedMdiWindowEventHandler? WindowInitializing
Event Type
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
Inherited Members
- MarshalByRefObject.GetLifetimeService()
- MarshalByRefObject.InitializeLifetimeService()
- MarshalByRefObject.MemberwiseClone(bool)
- object.GetType()
- object.MemberwiseClone()
- object.ToString()
- object.Equals(object)
- object.Equals(object, object)
- object.ReferenceEquals(object, object)
- object.GetHashCode()