We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Removing ctrl from DockingManager

Syncfusion 3.2.1.0 Is there a way to know when the user closes a ctrl that has been added to the docking manager? I need to actually close & remove the control when this occurs, not just hide it (which I understand to be the default behavior for the DockingManager). Any help you can provide will be greatly appreciated. Thanks, Dave

1 Reply

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

Loader.
Live Chat Icon For mobile
Up arrow icon