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

How to access Parent Docking Panes

3 Answers 115 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Srinivas
Top achievements
Rank 1
Srinivas asked on 19 Jun 2009, 05:37 PM
Hi,

We are planning to develop Visual Studio like Docking for our application or something like the Bug Tracking application that you developed. the left panel will hold our menu tree and the right pane is more specific to the page that we load in the middle which means, some transactions will make use of that pane and other don't. The bottom pane (the data grid area in the Bug tracking) holds data grid details. Our idea is to keep all panes visible all the time and the contents are loaded dynamically, depending on the menu tree selection. We want to know the mechanism to access the parent docking panes and also want to know how the drag and drop will works from a xaml page which does not contain any docking controls, as these pages are loaded onto the document host.

Do you have any sample application to demonstrate how to access parent docking panes and load contents dynamically?

Any help is apprecciated.

Thanks in advance
Srinivas

3 Answers, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 22 Jun 2009, 11:27 AM
Hello Srinivas,

Depending on the targeted RadPane parent, you can use some of the methods listed bellow:
var splitContainerParent = pane.ParentOfType<RadSplitContainer>(); 
var paneGroupParent = pane.ParentOfType<RadPaneGroup>(); 
var dockParent = pane.ParentOfType<RadDocking>(); 

Also, there is nothing special when loading dynamical content. You can set RadPane.Content by following these steps:
Button button = new Button(); 
button.Content = "new button"
radPane.Content = button; 


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.
0
Srinivas
Top achievements
Rank 1
answered on 23 Jun 2009, 07:05 PM
Hi,

Thank you very much for the details. As I mentioned in my previous post that we are trying to create Visual Studio like framework, the document pane contents are set to, for example, File-1.xaml and I would like to add a pane dynamically to the main docking framework from inside File-1.xaml.cs. Please note that inside File-1.xaml there won't be any docking controls as this will be a standard xaml controls but will be loaded inside the document pane of the main framework. In this case I cannot use pane.ParentOfType<RadSplitContainer>(); as there won't be any pane controls inside File-1.xaml, in this case how to access the main docking control so that I can add a new pane depending on the requirement of the File-1.xaml?

Also, in File-1.xaml we would like to add Drag-and-drop controls where the user can drag RadGridView row (which will be in File-1.xaml) and drop into a list box which will be inside the new pane that we add to the main docking control from inside File-1.xaml (as explained above). Is it possible? does the drag-and-drop control of one xaml file can recognize the drop control of another xaml when both present on the screen but they will be in two different docking panes?

Also, when I change the pane.contents to another xaml file, then does the previous contents are cleaned up by the Garbage Collector? When I replace pane.contents to new contents then I assume the Garbage Collector will remove previous contents, for example RadGridView rows from the memory. Please clarify, how pane.contents are removed from memory, if possible.

I really appreciate your help. We are in the finalization of the UI framework using Telerik controls and such features are our basic requirements.

Thank you,
Srinivas
0
Kaloyan
Telerik team
answered on 26 Jun 2009, 07:20 AM
Hi Srinivas,

Thank you for writing to us again.

About your first question - you can add a public property(of type RadPane) to your File-1.xaml where you can store a reference to the parent RadPane control. Thus, you can access the parent of the RadPane using the code we posted earlier. To clarify what I mean, I am attaching a small application demonstrating this approach.

About the second question - there is no problem to use the Drag and Drop framework in RadDocking. Here you can find our new Bugtracker demo demonstrating some functionalities similar to the once you are asking for. The source code of the application is available for download from your user account.

About you third question: The base type of the RadPane is ContentControl, so setting a new content of the pane will remove the old one (in case you add a reference to it). 


Greetings,
Kaloyan
the Telerik team

Instantly find answers to your questions on the newTelerik Support Portal.
Check out the tipsfor optimizing your support resource searches.
Tags
Docking
Asked by
Srinivas
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Srinivas
Top achievements
Rank 1
Share this question
or