Remove ToolWindow and DocumentWindow
After adding the ToolWindow and DocumentWindow, developers can remove them if they think the ToolWindow and DocumentWindow being added inappropriately. The Dock Control provides two different methods for developers to call to remove the ToolWindow and DocumentWindow. The CloseAction property determines the two methods and its valid values are listed as below:
Close, this value of CloseAction is able to close and detach the Dock Window from the Dock Control and wonât allow developers to manage the Dock collections.
Hide, this value of CloseAction is able to hide DockWindow and the window is only hidden in Dock Control. The Dock Window is not detached from the Dock Control. Developers can manage the Window from the Dock collections.
CloseAndDispose, this value of CloseAction is used to close and dispose the Dock Window. Key Methods of Object Model
RemoveWindow, this method is used to close and detach a DockWindow, regardless of the value of the property of CloseAction. This method may be used when developers pass only a DockWindow as a parameter. Additionally, developers can also pass a CloseAction parameter in the RemoveWindow method.
CloseWindow, this method is used to close a DockWindow combined with the property of CloseAction in this instance.
DocumentWindow, this method is the default behavior. The Document Window will be closed when the value of the CloseAction is CloseNDispose. The DocumentWindow can be closed from the UI if the property of CloseAction isnât set to the DocumentWindow.
ToolWindow: The ToolWindow will be closed from the UI when the property of CloseAction is not for ToolWindow. Developers can closed the window with setting the value of CloseAction to Hide, which allows developers reuse the ToolWindow for it is not disposed. |
UI Controlsfor Windows Forms .NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI DesignWinForms UI Controls WinForms Buttons UI Control WinForms Calendar UI ControlWinForms Carousel UI ControlWinForms Chart UI ControlWinForms Clock UI ControlCommandBar UI ControlWinForms Dock UI ControlDock - Getting Started Architecture and Features Arrange WindowsFloating WindowsAuto-Hide WindowsContext MenuReDockObject Model Create a Dock WindowCreate WindowRemove WindowAdvanced LayoutTab & CaptionAllowed Dock StatesUser Control and FormsLoad and Save LayoutDock - LocalizationDesktop Alert UI ControlDropDown List UI ControlWinForms Editor UI ControlForms and Dialogs UI ControlWinForms GridView UI ControlWinForms ListView UI ControlWinForms Menu UI ControlWinForms ComboBox UI ControlWinForms PageView UI ControlPanels and Labels UI ControlWinForms Panorama UI ControlWinForms PDFViewer UI ControlWinForms Property Grid UI ControlWinForms Ribbon UI ControlWinForms PivotGrid UI ControlWinForms RichTextBox UI ControlWinForms Rotator UI ControlWinForms Scheduler UI ControlWinForms Shortcuts UI ControlWinForms SpellChecker UI ControlWinForms Track & Status UI ControlWinForms TreeView UI ControlWinForms Wizard UI ControlWinForms Test UI ControlWinForms Theme UI Control |