Hello,
I want to close the Panes, and not just Hide them (put them in the ClosedPanes collection).
There is no CloseAction property on Pane, so how can i accomplish that?
I want to release the memory as the dynamically created documents/toolwindows are closed.
Thank you in advance,
Michael
Hi Michael,
do you really need to delete the closed panes? My point is that you could just set the panes Content to null in PaneClosed event so the memory of the content to be collected by the GC . Then the ContentPane object will resides in the ClosedPanes collection and eventually if you expect a lot of panes to be opened and closed you could reuse the already closed panes from the ClosedPanes collection.
This is just a suggestion. We could probably work to fix the workaround proposed by Nikola if you consider it more suitable.
Regards,
Hi Konstantin,
i had already implemented a reuse behavior of the closed panes, but i encountered the following problem.
1)I create a pane dynamicaly which is by default docked in the documents region.(I find/create a tabcontainerpane and add the pane to it's collection)
2)I docked it left in the xamdockmanager, and then i closed it.
3)I created another dynamic pane and i reused the previously closed pane. The pane should be shown again by default in the documents region.
4)I find/create a tabcontainerpane in the document regions and at the pane to it's collection.If OpenPane() method is not called, the ContainerPane won't show up.If i call the OpenPane() method it will show docked left (the before closed state of the Pane)
I would appreciate two quick fixes for both behaviors if applicable
I think that having common XAML codebase for WPF and SL , you should implement the CloseActionType property as WPF has... This will solve the above problems...
I have submitted a feature request directly to our product management team on your behalf to implement the Close Action in the Silverlight Version of the XamDockManager as is available in WPF. Our product team chooses new feature requests for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested features, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your feature is chosen for development, you will be notified at that time. Your reference number for this feature request is FR13305.
If you would like to follow up on your feature request at a later point, you may contact Developer Support management via email. Please include the reference number of your feature request in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Valerie
thank you for your help and for taking into considatarion my proposal.
But I would also need a workaround for one of the two methods mentioned in the previous posts, 1) handle the closing event or 2) Recycling closed panes ....
I have an application that uses a dock manager control from another vendor, because you did not provide one.. Now that you launched XamDockManager, i want to replace the existing control with yours, without loosing functionality or gaining many bugs/problems....
could you try the following:
void igXamDockManager_PaneClosing(object sender, CancellablePaneEventArgs e) { e.Cancel = true; ContentPane cPane = e.Pane as ContentPane; if (e.Pane.IsFloating == true) e.Pane.IsFloating = false; if (cPane != null && cPane.IsPinned == false) { cPane.IsPinned = true; } if (this.igXamDockManager.Panes.Contains(e.Pane)) { this.igXamDockManager.Panes.Remove(e.Pane); return; } else if (e.Pane.OwnerPane is TabGroupPane) (e.Pane.OwnerPane as TabGroupPane).Panes.Remove(e.Pane as ContentPane); else if (e.Pane.OwnerPane is SplitPane) (e.Pane.OwnerPane as SplitPane).Panes.Remove(e.Pane); }
I think that this might work for you.
I couldn't manage to reproduce this behavior
redbyron said: 1) When i close a ContentPane which is in a split container, The Pane becomes floating window
1) When i close a ContentPane which is in a split container, The Pane becomes floating window
However we have found a memory leak(about 420 B for a pane) which wont let the removed panes to be collected in some cases. We are targeting to fix this issue in August SR(the one after the upcoming one).
Please let me know if this does not resolves your issue completely or you need any further assistance.
Konstantin,
We have the same problem with disposing the ContentPane. I took your example from above and after making a few small modifications. I was able to remove most of the references from the ContentPane but as shown from the Memory profiler below, TabPaneHeader is not allowing the ContentPane to be released. I also included the code below, This is causing a major memory leak in our application. I would really appraciate your help.
Regards
private void xamDockManager_PaneClosing(object sender, CancellablePaneEventArgs e) { e.Cancel = true; ContentPane cPane = e.Pane as ContentPane; UIElement fContent = (UIElement)(cPane).Content; //If content is Plan Details call closeform for cleanup if (fContent.GetType().Equals(typeof(PlanDetails))) ((PlanDetails)fContent).CloseForm();
//If content is Pivot Container call closeform for cleanup if (fContent.GetType().Equals(typeof(PivotContainer))) ((PivotContainer)fContent).CloseForm();
cPane.Content = null; xamDockManager.ActivePane = null;
if (e.Pane.IsFloating == true) e.Pane.IsFloating = false; if (cPane != null && cPane.IsPinned == false) { cPane.IsPinned = true; } if (this.xamDockManager.Panes.Contains(e.Pane)) { this.xamDockManager.Panes.Remove(e.Pane); return; } else if (e.Pane.OwnerPane is TabGroupPane) { (e.Pane.OwnerPane as TabGroupPane).Panes.Remove(e.Pane as ContentPane);
(e.Pane.OwnerPane as TabGroupPane).SelectedPane = null;
} else if (e.Pane.OwnerPane is SplitPane) (e.Pane.OwnerPane as SplitPane).Panes.Remove(e.Pane); }