How To Capture RadPane Closing?

4 posts, 1 answers
  1. RoadWarrior
    RoadWarrior avatar
    45 posts
    Member since:
    Jan 2010

    Posted 30 Mar 2010 Link to this post

    What is the appropriate event to use to determine when a RadPane has been closed?  I have some very resource intensive content that needs to be cleaned up immediately whenever its RadPane container is closed.  So far I have been disappointed to find that none of the following events are triggered when the Pane is closed from either the RadPaneGroup or ToolWindow:

    • Docking.PaneStateChange
    • Docking.ItemContainerGenerator.ItemsChanged
    • Docking.ElementCleaned
    • Docking.ElementCleaning

    Please advise on how to accomplish this.
  2. Answer
    Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 30 Mar 2010 Link to this post

    Hi Rick,

     The following events are called during the load layout process:

    • Docking.ElementCleaned
    • Docking.ElementCleaning
    The Docking.PaneStateChange event is fired when the state of the pane is changed - this doesn't include when closed (but you are right that it should be called as this is a change of the state).

    In order to find out that a pane was closed you could hook-up to the Close event of the Docking control. It is fired when a was closed.

    Hope this helps!

    Greetings,
    Miroslav Nedyalkov
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. Clinton
    Clinton avatar
    22 posts
    Member since:
    May 2011

    Posted 16 Jun 2011 Link to this post

    Hi,

    How do I detect the Pane that was closed or PreviewClosed before it is destroyed?

    private

     

     

    void RadMainDockClose(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e)

    This sender comes back as a RadDocking and not a RadPanel.

    Cheers

    Clinton

     

  5. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 20 Jun 2011 Link to this post

    Hi Clinton,

    You should check Panes property of the StateChangeEventArgs object to find which pane is closed.

    Kind regards,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top