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...