Once a DockableControlPane with a specified key is created and added either directly to a DockArea, or to a DockableGroupPane, how can you completely remove the DockableControlPane from the UltraDockManager control so that UltraDockManager.PaneFromKey("Key of the removed pane") returns Nothing?I have used Panes.Remove(MyPane), but an instance of the pane still resides within the UltraDockManager. I have also tried MyPane.Dispose() which still leaves an instance of a pane with the specified key in the UltraDockManager.How can a pane be completely destroyed?
You can either remove the pane from the ControlPanes collection of the dock manager. Alternatively, if you will not be using the associated control anymore, you can just dispose the control and its pane will automatically be removed from the dock manager.
Looks like you guys have a nasty little bug in here that is causing a memory leak.
If you remove the pane, or dispose of it, the control is removed from ControlPanes OK. However, if the pane is a tabbed MDI Window then the internal MDIChildForms of the UltraDockManager is not cleared of the pane and it will therefore never be disposed causing a memory leak. This collection just keeps growing and growing as the user opens and closed new windows.
I have found NO WORKAROUND for this and it's KILLING my app. HELP!
The following code is used to create a test window:
Control ctrl = new TextBox(); ctrl.Dock = DockStyle.Fill; DockAreaPane areaDock = ultraDockManager1.DockControls(new Control[ { ctrl }, DockedLocation.Floating, ChildPaneStyle.TabGroup); DockableControlPane pane = areaDock.Panes[0] as DockableControlPane; count++; pane.Text = "Foo " + count.ToString() ; pane.Key = pane.Text; pane.Settings.AllowClose = Infragistics.Win.DefaultableBoolean.True; pane.Settings.AllowFloating = Infragistics.Win.DefaultableBoolean.True; pane.IsMdiChild = true; pane.Settings.AllowDockAsTab = Infragistics.Win.DefaultableBoolean.True; pane.Settings.AllowDockBottom = pane.Settings.AllowDockLeft = pane.Settings.AllowDockRight = pane.Settings.AllowDockTop = Infragistics.Win.DefaultableBoolean.False; pane.Activate();
using the following code to clean up:
private void DestroyClosedPanes() { foreach (DockableControlPane pane in ultraDockManager1.ControlPanes) { if (pane.Closed) { if (pane.Control != null) pane.Control.Dispose(); //removes from DockManager collections pane.Dispose(); } } } private void ultraTabbedMdiManager1_TabClosed(object sender, Infragistics.Win.UltraWinTabbedMdi.MdiTabEventArgs e) { DestroyClosedPanes(); }
They put out a hot patch for in for the 2007 release. We are only just now updating our code to 2008V3 so we have not tested it. I would HOPE that the fix is in there though.
I don't believe this issue was reported to the support group, so I don't think a fix was implemented. If you need this to be fixed, you can submit the issue here: http://es.infragistics.com/gethelp.
WTB6077, Resolved by Sam
Thanks for the support reference number.
Incident number WTB6077 was connected to development issue BR31293. A fix for this development issue was released in the July 2008 private hot fix.
This change would be included in the release of NetAdvantage Win Client (Windows Forms) 2008 Volume 3.
Alright, So will DockablePane be removed when I close it programatically or using UI? what should I do if I want to permanently delete a dockablepane which I created dynamically?
There is no way through the UI to permanently remove a dockable control pane. All ways through the UI to close a pane will just hide it. To remove a pane, it must be done programmatically by removing the pane from the ControlPanes collection on the dock manager or disposing the control which is docked.