Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1690
How to Close a Pane
posted

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

 

Parents
  • 6759
    Offline posted

    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,

Reply Children