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

Tracking layout changes within the Docking control

5 Answers 52 Views
Docking
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 24 Oct 2011, 01:59 PM
Hi,

I'm wanting to know when any RadPane, SplitContainer, or Group changes size or location within the RadDocking control?  I'm wanting to know so I can advise the user to "save" the layout.

I've looked at a few events on the Docking control but none seem to fire.

Could someone please advise what events (either on the RadPane itself or the Docking control) I need to watch in order to do this?  BTW, I'm not really interested in what the change was, just that it effected the layout.

Thanks,

David

5 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 24 Oct 2011, 05:15 PM
I've just realised (through another thread) that I have to hook into the SizeChanged event of the content within the RadPane which is fine, but I'd still like some advise on the Location of the RadPane within the Docking control and when it moves?
0
David
Top achievements
Rank 1
answered on 25 Oct 2011, 07:37 PM
Can anyone help, please?
0
George
Telerik team
answered on 26 Oct 2011, 02:55 PM
Hello David,

Thank you for contacting us.

Yes, handing SizeChanged for the RadPane.Content element could suit your needs. Moreover, if you want to get the pane location (if it is docked, floating or unpinned) I would suggest using the RadDocking.PaneStateChangedEvent. For more information, please refer to the following link - http://www.telerik.com/help/silverlight/raddocking-events-overview.html


Hope this helps.

Regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
David
Top achievements
Rank 1
answered on 02 Nov 2011, 11:56 AM
Sorry, this isn't actally what I mean.

If I move a floating pane from location 150, 200 to location 160, 300, how could I be made aware of this?  In this instance there is no size change to the pane only a location change within the RadDocking control.

This is very important to know so to advise the user to save their layout.
0
George
Telerik team
answered on 07 Nov 2011, 02:18 PM
Hi David,


When a pane goes floating, it is placed in a ToolWindow. There could be only one pane in this toolwindow, but the user could dock more than one pane and then RadPane.SizeChangedEvent won't help, too. This is the reason I would suggest using the ToolWindow.SizeChangedEvent. Here is how you could handle the event:

  1. Handle the RadDocking.PaneStateChanedEvent
  2. If the RadPane(the RadRoutedEventArgs.OriginalSource) is floating, get the parent toolwindow and handle the SizeChanged event. Please, refer to the code snippet below:

private void dock_PaneStateChange(object sender, RadRoutedEventArgs e)
{
    var pane = e.OriginalSource as RadPane;
    if (pane.IsFloating)
    {
        var toolwindow = pane.GetParentToolWindow();
        toolwindow.SizeChanged += new SizeChangedEventHandler(toolwindow_SizeChanged);
    }
}


Hope this helps.


Regards,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Docking
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
George
Telerik team
Share this question
or