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

RadDocumentPane close event

3 Answers 174 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Rogério
Top achievements
Rank 1
Rogério asked on 19 Mar 2009, 02:17 PM
Hello,

I need to know how can I handle "the closing event" of RadDocumentPane object. I need to execute some code when a specific RadDocumentPane is closed! The same applies to RadPane control.

Regards,
Rogério

3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 20 Mar 2009, 04:14 PM
Hello Rogério,

You could handle one of the Close or PreviewClose events of the RadDocking control. It gets an IEnumerable<RadPane> as a property of the arguments of the event. Currently the The IEnumerable<RadPane> has only one item in it. You can do like this:
<docking:RadDocking Close="docking_Close"
And in code-behind:
private void docking_Close(object sender, StateChangeEventArgs e) 
    RadPane pane = e.Panes.FirstOrDefault(); 
    if (pane != null
    { 
        // do smth. with the pane. 
    } 

You can do the same for the PreviewClose event. The difference is that the PreviewClose event is called before the actual hiding of the pane and you can cancel it by setting the Handled property of the arguments to true.

Hope this helps!

Kind regards,
Miroslav Nedyalkov
the Telerik team


Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rogério
Top achievements
Rank 1
answered on 20 Mar 2009, 04:52 PM

Thanks for the suggestion! It works, but I still have one problem.

Last week I've created a post with several issues and proposals for this control.
http://www.telerik.com/community/forums/silverlight/docking/raddocumentpane-q1-2009-canuserclose.aspx

Currently, we can only close a RadDocumentPane if we change it to floating mode! The problem is that we have two closing buttons!
0
Accepted
Miroslav Nedyalkov
Telerik team
answered on 23 Mar 2009, 08:14 PM
Hello Rogério,

We know about this issue and we will try to resolve it for the SP1.

Best wishes,
Miroslav Nedyalkov
Tags
Docking
Asked by
Rogério
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Rogério
Top achievements
Rank 1
Share this question
or