Hello, Ioannis,
RadDock has two different methods (
CloseWindow and
RemoveWindow) which you can call if you want to remove a
ToolWindow/
DocumentWindow. The result from these methods depends on the
CloseAction property which can have one of these values:
-
Close: When a
DockWindow has its
CloseAction set to
Close, this window is closed and detached (but not disposed) from its
RadDock. You cannot manage it from RadDock collections anymore.
-
Hide: When a
DockWindow has its
CloseAction set to
Hide, this window is only closed (hidden) in
RadDock. However, this window is not detached from its
RadDock and you can manage it from the
RadDock collections.
-
CloseAndDispose: When a
DockWindow has its
CloseAction set to
CloseAndDispose, this window is closed and then disposed.
Additional information is available in the following help article:
https://docs.telerik.com/devtools/winforms/controls/dock/object-model/removing-toolwindow-and-documentwindow-at-runtime
As to the question about closing the windows and restoring them at a later moment, note that when you close it at design time, the window is removed and you should add a new one when it is necessary.
It is recommended to manipulate the windows's visibility at run time by setting the
CloseAction property to
Hide for the desired
DocumentWindow. Then, right click that window's tab and select
Close. Then, call the
Show method in order to bring back the window.
I hope this information helps. If you need any further assistance please don't hesitate to contact me.
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik
Get
quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers.
Learn More.