DockingManager AutoDispose Controls

I'd strongly recommend a new feature of the DockingManager:

Add a Property: (bool) AutoDisposeClosedControls

When true and DockVisiblity Changes to False on a control, and it's no longer a tabbed control, you SetEnableDocking to false and Dispose() the control.


THis is necessary because if a user closes a docked control it will linger forever, eating unneeded resources, unless its disposed.

I'm handling this right now as:

private void dockingManager1_DockVisibilityChanged(object sender, DockVisibilityChangedEventArgs arg)
{
if (!dockingManager1.IsTabbed(arg.Control) &&
!dockingManager1.GetDockVisibility(arg.Control))
{
dockingManager1.SetEnableDocking(arg.Control, false);
arg.Control.Dispose();
}


1 Reply

GR Golda Rebecal Syncfusion Team November 3, 2007 10:29 AM UTC

Hi ERobishaw,

Thanks for suggesting this feature to us.

We have notified our development team on this regard and will get back to you once we hear back from them.

Best regards,
Golda


Loader.
Up arrow icon