This is a migrated thread and some comments may be shown as answers.
Auto-resize of RadPane inside a RadDocking, RadSplitContainer and RadPaneGroup
2 Answers 68 Views
This is a migrated thread and some comments may be shown as answers.
Baris
Top achievements
Rank 1
Baris asked on 18 Dec 2014, 08:16 AM
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>
19.</telerik:RadDocking>

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.

Regards,
Baris

2 Answers, 1 is accepted

Sort by
0
Vladi
Telerik team
answered on 19 Dec 2014, 01:17 PM
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.

Regards,
Vladi
Telerik
 

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.

 
0
Hans
Top achievements
Rank 1
answered on 17 Nov 2020, 06:42 AM

Hi,

What if I want to keep the documenthost pane (in the center) function and when it is closed, the two radspiltcontainers on the left and right can auto fill up the remaining space?

Asked by
Baris
Top achievements
Rank 1
Answers by
Vladi
Telerik team
Hans
Top achievements
Rank 1
Share this question
or