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?
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://ko.infragistics.com/gethelp.
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.
Is this issue fixed in latest Winclient 2008 vol 3 release?
One caveat to this fix. You have to override watch for the main window closing otherwise the cancel will abort the main closing.
Adding this helps:
private const int WM_SYSCOMMAND = 0x112; private const int SYSCMD_CLOSE = 0xF060; private bool _mainformClosing = false; protected override void DefWndProc(ref Message m) { _elapsed = 0; if (m.Msg == WM_SYSCOMMAND && m.WParam.ToInt32() == SYSCMD_CLOSE) _mainformClosing = true; base.DefWndProc (ref m); }
Then use _mainformClosing in the MDIManager_TabClosing event to bypass the pane closing if you are closing the main window. Nastyness occurs if you don't.
I would recommend submitting this issue to the support group: http://ko.infragistics.com/gethelp. In the meantime, you can implement this workaround: Handle the ultraTabbedMdiManager1's TabClosing event like this:
private void ultraTabbedMdiManager1_TabClosing( object sender, CancelableMdiTabEventArgs e ){ MdiChildForm form = e.Tab.Form as MdiChildForm;
if ( form != null ) { DockableControlPane pane = form.Pane;
pane.IsMdiChild = false;
if ( pane.Control != null ) pane.Control.Dispose(); //removes from DockManager collections
pane.Dispose();
e.Cancel = true; }}