VS
Vijayanand S
Syncfusion Team
February 10, 2006 04:18 PM UTC
Hi Dave,
You could use the DockVisibilityChanged event to know the control visibility status. This event triggers after the controls visibility has changed (i.e when you click on the ''x'' button of the docking windows).
And also dockingManager.GetDockVisibility(ctrl) method to know the current status of the docking window.
You coud use this following code snippet to remove the control when it hides:
private void dockingManager1_DockVisibilityChanged(object sender,
Syncfusion.Windows.Forms.Tools.DockVisibilityChangedEventArgs arg)
{
if(!this.dockingManager1.GetDockVisibility(arg.Control))
{
this.dockingManager1.SetEnableDocking(arg.Control,false);
arg.Control.Dispose();
}
}
I hope this resolves your requirement. Please let me know if you have any questions.
Thanks for using Syncfusion Products.
Regards,
Vijay