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

Layout changes

6 Answers 92 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Aaron Smith
Top achievements
Rank 1
Aaron Smith asked on 24 Jun 2009, 06:39 PM
Hi,

I want to save the layout whenever the user changes the sizes, positions, etc with the dashboard.  I understand how to use the xml string to save, my question is what is the best way to trap the events related to these actions?  What events are exposed to do this?

Also, can I distinguish between when someone closes a window inside of a dock vs. just changing the layout?  I need to be able to remove that window from the user account when they no longer want it.  

Thanks for your time.

6 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 26 Jun 2009, 02:40 PM
Hello Aaron Smith,

Thank you for writing to us. You can use the RadPane's LayoutUpdated and Loaded events to determine when the size, position and DockState of the RadPane are changing. Do not hesitate to contact us if you have some additional questions.

Regards,
Kaloyan
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
Aaron Smith
Top achievements
Rank 1
answered on 26 Jun 2009, 06:21 PM
Great what about the second part of my question?
0
Aaron Smith
Top achievements
Rank 1
answered on 26 Jun 2009, 07:40 PM
Ok I found the window close event (not sure how I missed it before, doh) but now my question is, how can I get the serialization tag from this event?
0
Kaloyan
Telerik team
answered on 01 Jul 2009, 09:08 AM
Hello Aaron Smith,

As a solution you can loop throughout the RadDocking's panes and get the serialization tag value from this panes, which is an attached property: Please check the code below:

private void Docking_WindowClose(object sender, Telerik.Windows.RadRoutedEventArgs e) 
        { 
            foreach (var panes in this.Docking.Panes) 
            { 
                object value = panes.GetValue(RadDocking.SerializationTagProperty); 
            } 
        } 


Regards,
Kaloyan
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
Aaron Smith
Top achievements
Rank 1
answered on 13 Jul 2009, 08:18 PM
That cyles through all the panes.  How do I just get the one being closed?
0
Kaloyan
Telerik team
answered on 14 Jul 2009, 03:18 PM
Hi Aaron Smith,

You can use  RadDocking's Close even instead of window's Close event. The handler of this event provides you with an StateChangeEventArgs argument that contains RadPanes which are changed - in this case closed. Check the example below.
          radDocking.Close += new System.EventHandler<Telerik.Windows.Controls.Docking.StateChangeEventArgs>(radDocking_Close); 
 
    void radDocking_Close(object sender, Telerik.Windows.Controls.Docking.StateChangeEventArgs e) 
        { 
            foreach (var pane in e.Panes) 
            { 
                object value = pane.GetValue(RadDocking.SerializationTagProperty); 
            } 
        } 


Best wishes,
Kaloyan
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.
Tags
Docking
Asked by
Aaron Smith
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Aaron Smith
Top achievements
Rank 1
Share this question
or