Programatically changing RadPaneGroup Height

4 posts, 0 answers
  1. Andrew
    Andrew avatar
    104 posts
    Member since:
    May 2008

    Posted 29 Oct 2012 Link to this post

    I have a RadSplitContainer that looks like so:

    <telerik:RadSplitContainer x:Name="radSplitContainer" Orientation="Vertical">
        <telerik:RadPaneGroup>
            <telerik:RadPane CanFloat="False" CanUserClose="False" CanUserPin="False" PaneHeaderVisibility="Collapsed">
                    <telerik:RadTileView x:Name="tileView"/>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
        <telerik:RadPaneGroup x:Name="gridPaneGroup">
            <telerik:RadPane CanFloat="False" CanUserClose="False" CanUserPin="False" PaneHeaderVisibility="Collapsed" x:Name="gridPane" IsHidden="False">
                <local:MyControl/>
            </telerik:RadPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>

    Is there a way in which I can programatically change the Height of the second RadPaneGroup? I've tried doing something like:

    this.gridPaneGroup.Height = 150;

    but it does not appear to change the height of the pane at all. Any help on this would be appreciated.

    Thanks.
  2. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 01 Nov 2012 Link to this post

    Hello Andrew,

    In RadDocking changing the size of a PaneGroup to a specific size is not supported. By design in the control all PaneGroups in a specific SplitContainer take the size of that container. It is not possible to explicitly set a size to a group but it is possible to set a relative size between PaneGroups.

    You can read this help article that goes through on how to Set Relative Sizes to RadPanegroups.

    All the best,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
  4. Andrew
    Andrew avatar
    104 posts
    Member since:
    May 2008

    Posted 01 Nov 2012 Link to this post

    That would help, but I don't see a way to set that property programatically. Is there a way?
  5. Vladi
    Admin
    Vladi avatar
    744 posts

    Posted 02 Nov 2012 Link to this post

    Hi Andrew,

    In order to set the RelativeSize from the code behind you will need to use the SetRelativeSize() method of the ProportionalStackPanel class.

    The next code snippet shows how to change the relative size of the gridPaneGroup from your example:
    Telerik.Windows.Controls.ProportionalStackPanel.SetRelativeSize(this.gridPaneGroup, new Size(200, 200));

    Hope this helps.

    Regards,
    Vladi
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top