Auto-resize of RadPane inside a RadDocking, RadSplitContainer and RadPaneGroup

2 posts, 0 answers
  1. Baris
    Baris avatar
    1 posts
    Member since:
    Jun 2014

    Posted 18 Dec 2014 Link to this post

    Hello there,

    I want to be able to auto-resize a RadPane inside a RadDocking and RadSplitContainer up to the remaining place, when other sibling RadPanes get undocked and moved away per Drag&Drop.

    Please, take a look at the attached code snippet for more info.

    01.<telerik:RadDocking x:Name="dockEngineering" 
    02.        Grid.Row="1"
    03.        Margin="0,0,0,0"                                   
    04.        BorderThickness="0"
    05.        Padding="0"
    06.        Background="{StaticResource LightGrayBrush}"
    07.        x:FieldModifier="public">
    08.    <telerik:RadDocking.DocumentHost>
    09.        <telerik:RadSplitContainer x:Name="MiddleContainer">
    10.            <telerik:RadPaneGroup x:Name="MiddleGroup">
    11.                <telerik:RadPane x:Name="ProgressPane" Header="Progress View" >
    12.                    <Grid Name="grdProgress">
    13.                        <local:ProgressView DataContext="{Binding ProgressViewModel}"/>
    14.                    </Grid>
    15.                </telerik:RadPane>
    16.            </telerik:RadPaneGroup>
    17.        </telerik:RadSplitContainer>
    18.    </telerik:RadDocking.DocumentHost>

    There are other RadPanes parallel to ProgressPane, and 3 more RadSplitContainers parallel to RadDocking.DocumentHost inside RadDocking.
    As said, when one of the other gets collapsed and more space is available at that docking position, I want the other RadPanes to stretch in size to take over that space.

    How can I do this? Thanks.

  2. Vladi
    Vladi avatar
    749 posts

    Posted 19 Dec 2014 Link to this post

    Hi Baris,

    Thank you for contacting us.

    By design the RadDocking control as any other dock manager has a built-in feature which will auto resize one of its panels in order to occupy the entire available space left when Pane instances are pinned/unpinned/floated etc. In the RadDocking by default that functionality is implemented by its DocumentHost. When a RadPane instance is moved around (unpinned etc.) the contents of the DocumentHost will be resized to occupy the new available space. There is also another way of achieving such auto resize functionality and it is by removing the DocumentHost. By doing so the last declared in the XAML RadPane/PaneGroup will be auto resized to occupy the available space. In order to remove the DocumentHost all you need to do is set the HasDocumentHost property of the RadDocking to False.

    I recorded short video for you showing the described scenarios, hope this is helpful.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top