The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
VSVijayanand 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