Programmatically added RadPane Size

6 posts, 1 answers
  1. Zack
    Zack avatar
    11 posts
    Member since:
    Dec 2017

    Posted 22 Aug 2019 Link to this post

    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);
  2. Zack
    Zack avatar
    11 posts
    Member since:
    Dec 2017

    Posted 22 Aug 2019 Link to this post

    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.

  3. Answer
    Dinko
    Admin
    Dinko avatar
    1128 posts

    Posted 27 Aug 2019 Link to this post

    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.
  4. Zack
    Zack avatar
    11 posts
    Member since:
    Dec 2017

    Posted 27 Aug 2019 in reply to Zack Link to this post

    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.
  5. Dinko
    Admin
    Dinko avatar
    1128 posts

    Posted 28 Aug 2019 Link to this post

    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.
  6. Zack
    Zack avatar
    11 posts
    Member since:
    Dec 2017

    Posted 28 Aug 2019 Link to this post

    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.
Back to Top