Assign Proportional widths to a group of RadSplitContainers

3 posts, 0 answers
  1. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 24 Jul 2015 Link to this post

    Hi, I have three horizontaly tiled RadSplitContainers inside another RadSplitContainer and I want to set the width of each one in percentage terms for the space available.

    For example:

    RadSplitContainer1 width should be 2/10 of available horizontal space

    RadSplitContainer2 width should be 5/10 of available horizontal space

    RadSplitContainer3 width should be 3/10 of available horizontal space


    I am a bit confused with the documentation on how to achieve this. Anyone to kindly suggest a practical example?





  2. George
    George avatar
    62 posts
    Member since:
    Sep 2008

    Posted 24 Jul 2015 in reply to George Link to this post

    And since we are at this subject, another more demanding case where the first splitcontainer has a fixed size, while the other two take a proportion of the available left space:


    RadSplitContainer1 width should have a fixed non changeable width of 250
    RadSplitContainer2 width should be 4/10 of the available horizontal space
    RadSplitContainer3 width should be 6/10 of available horizontal space​

     I would greatly appreciate a response also to this case.





  3. Nasko
    Nasko avatar
    699 posts

    Posted 27 Jul 2015 Link to this post

    Hi George,

    With the current version of RadDocking setting a fixed size to the Pane or Group is not supported and might lead to some unexpected behavior. Because of that in order to set a size to the Pane we suggest to use the ProportionalStackPanel.RelativeSize attached property.

    That panel is provided by the SplitContainer element in the Docking control and it inherits the default WPF panel class. Its RelativeSize property is used to divide the width and height occupied by the RadPaneGroups placed in the same RadSplitContainer. For example if you have two SplitContainers and you want the first one to occupy 1/3 of the available width you need to set the RelativeSize to "200,200" and the second SplitContainer should have size "400,200" - thus it will occupy the remaining 2/3. The same is also valid if you want to divide the height - 400 indicates the width of the size and 200 is the height.

    Please, check the attached sample project that demonstrates how achieve the desired by you sizing of the SplitContainers and let us know if it worked for you.

    Hopes this helps.

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