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

Programmatically added RadPane Size

5 Answers 163 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Zack
Top achievements
Rank 1
Veteran
Zack asked on 22 Aug 2019, 07:30 PM

When I programatically add a radpane to docking. It is coming out only as tall as the header of a pane. (Picture attached of result.)

I have tried a few methods.

Here is what I am trying:

RadPane dockPaneCalc = new RadPane() {
     IsHidden = false,
     Content = new RadCalculator()
     {
         VerticalAlignment = VerticalAlignment.Stretch,
         HorizontalAlignment = HorizontalAlignment.Stretch
     }
 };
 
 RadPaneGroup paneGroup = new RadPaneGroup();
 RadSplitContainer splitContainer = new RadSplitContainer() {
     InitialPosition = Telerik.Windows.Controls.Docking.DockState.FloatingOnly,
     Height = 350,
     Width = 250
 };
 
 RadDocking.SetFloatingLocation(splitContainer, new Point(200, 200));
 RadDocking.SetFloatingSize(splitContainer, new Size(250, 350));
 
 paneGroup.Items.Add(dockPaneCalc);
 splitContainer.Items.Add(paneGroup);
 dockMain.Items.Add(splitContainer);

5 Answers, 1 is accepted

Sort by
0
Zack
Top achievements
Rank 1
Veteran
answered on 22 Aug 2019, 10:36 PM

I finally decided on a simpler route, to make a Window usercontrol with it in it.

Would still like to know how to overcome the issue as I/others might need it in future and it would be nice to persist with the persistenceframework with less plumbing.

0
Accepted
Dinko | Tech Support Engineer
Telerik team
answered on 27 Aug 2019, 11:40 AM
Hi Zack,

Thank you for the provided image and code snippet.

I have tested this behavior but wasn't able to reproduce it. I am looking at the image you are using Office2016 theme. Correct me if I am wrong. I am attaching the sample project, which I used to test this scenario. May I ask you to take a look at it and let me know what I need to modify to reproduce the behavior demonstrated in the attached image.

I am looking forward to your reply.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Zack
Top achievements
Rank 1
Veteran
answered on 27 Aug 2019, 01:46 PM
It does appear that your demo works as I would expect. However, in my case I am using VisualStudio2013 theme, RadRibbonWindow/RadRibbonView and PersistenceFramework for the docking inside of that. When I get some time, I will try to0 modify the demo to be the same as our app and see if I can recreate. Otherwise, going with the Window instead of pane has fixed our issue and has the same effect for our purpose.
0
Dinko | Tech Support Engineer
Telerik team
answered on 28 Aug 2019, 10:56 AM
Hello Zack,

I am happy to hear that you have a workaround for this behavior in your application. If you manage to isolate this in a standalone project, you can send it to us, and we will investigate this behavior. 

In the meantime, if you have any other questions, you can open a new thread with your questions inside.

Regards,
Dinko
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Zack
Top achievements
Rank 1
Veteran
answered on 28 Aug 2019, 01:17 PM
I marked your demo as answered. I can't reproduce, even if I change your demo to have most of what is involved. Thank you for your time.
Tags
Docking
Asked by
Zack
Top achievements
Rank 1
Veteran
Answers by
Zack
Top achievements
Rank 1
Veteran
Dinko | Tech Support Engineer
Telerik team
Share this question
or