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

RadPaneGroup initialPosition and initialSize

1 Answer 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Chao
Top achievements
Rank 1
Chao asked on 10 Apr 2014, 06:27 PM
I want to change the position and size of a RadPaneGroup programatically based on user actions. I tried setting the initialPosition but that doesn't seem to work. I also tried RadPane.removeFromParent() and RadPaneGroup.Items.Add() and then set the initialPosition but no luck.

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 14 Apr 2014, 07:49 AM
Hi Chao,

I've noticed you have opened a support ticket with the same question but for Silverlight. However the approach we have provided you there could be used for WPF as well. I'm copying our answer here in order to be available to the community:

In order to dock a specific RadPane instance using the code behind you could do the following:
  • Create a new RadPaneGroup
  • Use the RemoveFromParent method on the RadPane which is being docked
  • Create a new RadSplitContainer and set its InitialPosition to the desired DockState value
  • Add the RadPane that is being docked to the Items of the RadPaneGroup
  • Add the RadPaneGroup to the new RadSplitContainer
  • Finally add the RadSplitContainer to the RadDocking Items.

I'm also attaching a sample project for WPF which demonstrates the same approach, note that the example also demonstrates how to set the size of the SplitContainer when creating it (as you have also asked about that in the ticket).

Hope this will work for you.

Regards,
Kalin
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
General Discussions
Asked by
Chao
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or