This is a migrated thread and some comments may be shown as answers.

How To Capture RadPane Closing?

3 Answers 183 Views
Docking
This is a migrated thread and some comments may be shown as answers.
RoadWarrior
Top achievements
Rank 1
RoadWarrior asked on 30 Mar 2010, 02:39 PM
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.

3 Answers, 1 is accepted

Sort by
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 30 Mar 2010, 03:10 PM
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.
0
Clinton
Top achievements
Rank 1
answered on 16 Jun 2011, 05:35 AM
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

 

0
Yana
Telerik team
answered on 20 Jun 2011, 10:38 AM
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
Tags
Docking
Asked by
RoadWarrior
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Clinton
Top achievements
Rank 1
Yana
Telerik team
Share this question
or