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

Resizing the RadPaneGroup/RadSplitContainer in RadDocking

3 Answers 288 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Maulik Patel
Top achievements
Rank 1
Maulik Patel asked on 11 Mar 2010, 11:51 AM
Hi,

I am trying to set the width and height of the RadPaneGroup to particular pixel size (not in percentage) in RadDocking. It doesn't work as required. Can anyone tell me how I can achieve that? I tried by RelativeSize option but that set width/height in proportional manner. Please let me know how I can do it?

void AddPane()
        {
            RadDocking oRadDocking = new RadDocking();
            oRadDocking.Name = "mainDock";
            oRadDocking.HasDocumentHost = false;
            
            
                //Add Split Container
                RadSplitContainer oRadSplitContainer = new RadSplitContainer();
                //oRadSplitContainer.SetValue(DockingPanel.InitialSizeProperty, new Size(50, 200));
                oRadSplitContainer.Orientation = Orientation.Horizontal;
                ProportionalStackPanel oProp = new ProportionalStackPanel();
                
                //oRadSplitContainer.Width=100;
            
                    //Add Pane Group
                    RadPaneGroup oRadPaneGroup1 = new RadPaneGroup();
                    oRadSplitContainer.SetValue(DockingPanel.InitialSizeProperty, new Size(25, 200));
                    //oRadPaneGroup1.SetValue(ProportionalStackPanel.WidthProperty, Convert.ToInt32(25));
                    //oRadPaneGroup1.Width = 200;
                    //Add Panes
                    RadPane oRadPane1 = new RadPane();
                    oRadPane1.Header = "Favorites";
                    oRadPane1.CanFloat = false;
                    oRadPane1.CanUserPin = false;
                    
                    oRadPaneGroup1.Items.Add(oRadPane1);
            
            
                    //Add Pane Group
                    RadPaneGroup oRadPaneGroup2 = new RadPaneGroup();
                    //Add Panes
                    RadPane oRadPane2 = new RadPane();
                    oRadPane2.Header = "Folder List";
                    oRadPane2.CanDockInDocumentHost = false;                    
                    oRadPane2.CanFloat = false;
                    oRadPane2.CanUserPin = false;
                    oRadPane2.CanUserClose = false;
                    oRadPane2.IsBreak = false;
                    oRadPane2.IsEnabled = false;
                    
                    
                    
                        //Add new split container in Pane 2
                        RadSplitContainer oRadSplitContainer2 = new RadSplitContainer();
                        oRadSplitContainer2.Orientation = Orientation.Vertical;
                        
                            //Add Pane Group
                            RadPaneGroup oRadPaneGroup21 = new RadPaneGroup();
                            oRadSplitContainer2.SetValue(ProportionalStackPanel.RelativeSizeProperty, new Size(200, 20));
                            //Add Panes
                            RadPane oRadPane21 = new RadPane();
                            oRadPane21.Header = "Shell Tree";
                            oRadPane21.CanFloat = false;
                            oRadPane21.CanUserPin = false;
                            
                            oRadPaneGroup21.Items.Add(oRadPane21);
            
            
                            //Add Pane Group
                            RadPaneGroup oRadPaneGroup22 = new RadPaneGroup();
                            //Add Panes
                            RadPane oRadPane22 = new RadPane();
                            oRadPane22.Header = "Most Recently Used";
                            oRadPane22.CanFloat = false;
                            oRadPane22.CanUserPin = false;
                            
                            oRadPaneGroup22.Items.Add(oRadPane22);
                            //oRadPaneGroup21.Items.Add(oRadPane22);
            
                        oRadSplitContainer2.Items.Add(oRadPaneGroup21);
                        //oRadPaneGroup21.Height=100;
                        oRadSplitContainer2.Items.Add(oRadPaneGroup22);
            
                        //oRadPane2.Content = oRadSplitContainer2;
            
                    //oRadPaneGroup2.Items.Add(oRadPane2);
                        //oRadPaneGroup2.Items.Add(oRadSplitContainer2);
            
                    
                oRadSplitContainer.Items.Add(oRadPaneGroup1);
                //oRadSplitContainer.Items.Add(oRadPaneGroup2);
                oRadSplitContainer.Items.Add(oRadSplitContainer2);

            //oRadDocking.Items.Add(oRadSplitContainer);
            this.LayoutRoot.Children.Add(oRadSplitContainer);
            //this.LayoutRoot.Children.Add(oRadDocking);
                       
        }

I have attached .jpg (for output) for reference.


Regards,
Maulik

3 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 15 Mar 2010, 01:38 PM
Hello Maulik,

 The size of RadPaneGroups is set only in relative units - its not supported to set it in absolute pixels. Could you please give us some more information about your scenario and we will try to help you to achieve it.

All the best,
Miroslav Nedyalkov
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Maulik Patel
Top achievements
Rank 1
answered on 15 Mar 2010, 03:00 PM
Hi Miroslav,

Thanks for a reply.

Here is what I am looking for. Please have a look of an attached image - Dashboard.jpg. I need to create a dashboard kind area/form where user has configured some components and those get renderred. You can see there are four different areas on the form. Out of those, top area requires to have a fix height and 100% width (fill width). Then, there are other areas on the form which requires specific width and specific position/anchoring. And all those areas need to be splitted in a manner that user can increase/decrease areas using split control.

I was trying to achieve these functionalities using the DockingPane and SplitContainer control. Is it really possible to achieve using such controls or I would have to use another controls? I would really appreciate your help if you can suggest me a work around like I can use other telerik control or something.

Thanks,
Maulik
0
Miroslav Nedyalkov
Telerik team
answered on 19 Mar 2010, 09:44 AM
Hi Maulik,

It is possible to achive this result. It is just not straight-forward. What you need to do is to use different SplitContainers for all the groups and dock them in the root DockPanel. Plese refer to the attached example that demonstrates how to achieve the searched effect.

Kind regards,
Miroslav Nedyalkov
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
Tags
Docking
Asked by
Maulik Patel
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Maulik Patel
Top achievements
Rank 1
Share this question
or