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

How to add RanePaneGroup to RadSplitContainer docked to the right

2 Answers 135 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 14 Jan 2016, 09:36 PM

I am trying to implement a solution where a RadPane can be maximized/restored. My solution is based on this topic http://www.telerik.com/forums/add-maximize-button-to-radpane-header, which unfortunately is very much incomplete. I have updated the solution (using Q1 2016) to be a more complete solution that handles different scenarios and have one last thing to figure out (at least at this point). When I maximize the only RadPane in the RadPaneGroup, the group is removed from RadSplitContainer (since I took the only pane out of the group). So when I try to restore layout, I need to add RadPane to the RadPaneGroup and then place RadPaneGroup back to the original location in the RadSplitContainer - this is unfortunately something I have not been able to figure out.

 

Here is how to see what I am trying to do. Take the solution from link (I used VS 2015 with dot.net 4.6.1). Run it, then drag Panel 1 from left side to the right of the window, so you end up with 2 RadPaneGroups each with 1 RadPane. Maximize the RadPane on right side and then restore it. What you will see is the restored pane is no longer on the right of the window, but is docked to the left right next to the other pane. In code in MainWindow.xaml.cs, this logic is on line 76. All I do is add it to the RadSplitContainer.Items collection and it places it on the left. I need help figuring out how to place it back where it was before maximize logic was executed.

https://drive.google.com/file/d/0B9CRDbP2kUo7dzZkcDY3Z2tXQUk/view?usp=sharing

Thank You

2 Answers, 1 is accepted

Sort by
0
Eric
Top achievements
Rank 1
answered on 14 Jan 2016, 09:40 PM
0
Vladi
Telerik team
answered on 19 Jan 2016, 01:18 PM
Hi Eric,

Thank you for contacting us.

In the current version of the RadDocking control the described behavior is not available as a built-in feature. This scenario has been brought to our attention previously and it was added to our public feedback portal, you can vote for it and track its status here.

We took a look at the provided sample project that illustrates a possible custom implementation of discussed behavior and unfortunately the issues you are currently having are the main reasons why the RadDocking control currently does not include this functionality just yet. Because of the nature of the control its RadPane instances could be moved to multiple places leaving behind empty RadPaneGroup/RadSplitContainer instances. Having in mind all of the possible ways a RadPane/RadPaneGroup can be moved around during run time, currently we cannot provide you with information on how achieving this behavior could be implemented on your side. As a general rule you will need to implement an mechanism that "remembers" the relative position (for example the RadPane was at Top/Left position) and using this information manually create a RadSplitContainer and set its InitialPosition, after which create the necessary RadPaneGroup and add the "minimized/restored" RadPane instance to it. This is the general idea how such feature could be implemented in the current version of the RadDocking control, have in mind that this has not been tested and it is possible that there may be issues when creating such custom implementation.

As this feature is a complex one we recommend that you follow the mentioned feedback item and take advantage of it when its implemented. We are always trying to improve our products and we will do our best to introduce this feature in one of our future versions of Telerik UI for WPF. If we can be of any further assistance do not hesitate to contact us again.

Regards,
Vladi
Telerik
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 Feedback Portal and vote to affect the priority of the items
Tags
Docking
Asked by
Eric
Top achievements
Rank 1
Answers by
Eric
Top achievements
Rank 1
Vladi
Telerik team
Share this question
or