This is a migrated thread and some comments may be shown as answers.

Setting size of the RadPane

10 Answers 1157 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Ujjwal Lahoti
Top achievements
Rank 1
Ujjwal Lahoti asked on 21 Apr 2010, 04:28 PM
Is there a way to set minimum/maximum width of RadPane. When I try to do that, that the RadPanes don't fill the complete space (see attached image). Also when I resize the window I want to be able to set RadPane's widths.

Other solution I have seen is that set the Realtive size of the RadPanes in a RadPaneGroup. However I have some windows, I want them to be of FixWidth/FixHeight, and with Resizing, I don't want them to change.

If you have an example, that illustrates different resizing options do let me know.

10 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 23 Apr 2010, 05:17 PM
Hi Ujjwal,

 There are two types of sizing in the Docking control - relative and absolute. In the current version they cannot be used together. The absolute sizes are used for the size of the root-level SplitContainers and the relative are used for the items of the SplitContainers.

Setting MinWidth and MinHeight, MaxWidth and MaxHeight should work fine, but you shouldn't set it on the panes, but on the groups and split containers. Unfortunately if you do this when the user drags a group this could be no longer valid.

All the best,
Miroslav Nedyalkov
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Ujjwal Lahoti
Top achievements
Rank 1
answered on 27 Apr 2010, 08:36 PM
Thanks for the reply.

Does this mean, to provide a width/Height to a RadPane, can I create a SplitContainer with only one item? Would this work?
0
Ujjwal Lahoti
Top achievements
Rank 1
answered on 27 Apr 2010, 08:59 PM
Further to state my problem again, if I have a Split container, with Orientation Vertical, and there are 2 panes inside it. Can I specify Height for one of the panes, and let the other pane cover remainder of the space? If the user changes it later, it is acceptable to me.
0
Miroslav Nedyalkov
Telerik team
answered on 29 Apr 2010, 01:26 PM
Hi Ujjwal,

 This is not supported yet. We had plans to add absolute sizing the SplitContainers, but we decided to postpone this feature for now.

Setting Width and Height to the panes will not affect the space their content occupies. The Width and Height will take effect only for root-level split containers.

If you describe us your scenario we might be able to help you find a solution how to organize your layout with the limitations of the Docking control. A screenshot will be very helpful for this.

Kind regards,
Miroslav Nedyalkov
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Davy Tavernier
Top achievements
Rank 1
answered on 10 Jun 2010, 10:46 AM
I have a similar problem.

My Docking control is defined like this:

 

<radDock:RadDocking x:Name="radDocking1" HasDocumentHost="False">  
            <radDock:RadSplitContainer Orientation="Vertical" radDock:RadDocking.DockState="DockedTop">  
                <radDock:RadPaneGroup Focusable="False" MinHeight="150" 
                                      radDock:ProportionalStackPanel.RelativeSize="100,100">  
                    <radDock:RadPane x:Name="rpCriteria" ContextMenuTemplate="{x:Null}" 
                                     Header="Zoekopdracht ingeven" 
                                     IsPinned="{Binding Path=ViewModel.ZoekenPinInfo, Mode=TwoWay}" 
                                     CanUserClose="False" CanFloat="False" 
                                     Content="{Binding Path=ViewModel.ZoekCriteria}">  
                    </radDock:RadPane> 
                </radDock:RadPaneGroup> 
                <radDock:RadPaneGroup Focusable="False" radDock:ProportionalStackPanel.RelativeSize="100,400">  
                    <radDock:RadPane x:Name="rpResultaat" ContextMenuTemplate="{x:Null}" 
                                     Title="{Binding Path=ViewModel.ZoekResultaatTitle}" 
                                     CanUserClose="False" CanFloat="False" CanUserPin="False" 
                                     Content="{Binding Path=ViewModel.ZoekResultaat}">  
                    </radDock:RadPane> 
                    <!--TitleTemplate="{StaticResource TitleTemplate}"--> 
                </radDock:RadPaneGroup> 
            </radDock:RadSplitContainer> 
        </radDock:RadDocking> 

I've also added a screenshot to this post of how the application looks with this docking control.

Now, the user can resize the two radpanegroups with the splitcontainer, but when he leaves the tab with docking control and comes back to it, the two radpanegroups are in their original relative size again as defined in the xaml, which is of course logical. Now, the user needs to come back to this screen with the radpanegroups the same size as he left it.

I tried this to remove the relative size and setting the Height property op the RadPanegroup (and bind it to my viewmodel), but then the radpanegroups are not nicely alligned with each-other anymore.

Is there a way to accomplish this?

0
Miroslav Nedyalkov
Telerik team
answered on 14 Jun 2010, 05:55 PM
Hello Davy,

 Changing tabs shouldn't reset the layout of the Docking control. Could you pleases send us a sample project that reproduces the problem? This would help us investigate what the problem is.

Greetings,
Miroslav Nedyalkov
the Telerik team

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 Public Issue Tracking system and vote to affect the priority of the items.
0
Davy Tavernier
Top achievements
Rank 1
answered on 15 Jun 2010, 06:43 AM
I already know why the application lost the layout of the docking control when tabbing. It's because the UserControl where docking control is on gets destroyed when tabbing. I need to bind the properties of my layout to the underlying viewmodel to keep the layout settings.
0
Miroslav Nedyalkov
Telerik team
answered on 17 Jun 2010, 02:07 PM
Hello Davy,

 I'm happy that you found the source of the problem. If you have further questions, don't hesitate to contact us.

Sincerely yours,
Miroslav Nedyalkov
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
0
Daniel B.
Top achievements
Rank 1
answered on 26 May 2015, 04:17 AM

@Telerik - can you please confirm if this absolute sizing (or even just min-height restrictions) can be applied to mutiple RadPaneGroup children of RadSplitContainers yet?

Your documentation doesnt make any mention of this, and adding height, minheight or maxheight breaks the alignment of panels, hiding the first behind the others (see second screenshot) 

Here is my use case (code excerpt and screenshots)

 

<!-- Left Docking -->
<telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft"
                           telerik:RadDocking.SerializationTag="DockedLeftSplit1"
                                Width="200"
                           >
    <telerik:RadPaneGroup x:Name="LeftPanelGroup1"
                          telerik:RadDocking.SerializationTag="LeftPanelGroup1"
                           telerik:ProportionalStackPanel.RelativeSize="100, 17"
                          MaxHeight="30"
                          >
 
        <telerik:RadPane Header="Search" Tag="SearchPanel"
                         telerik:RadDocking.SerializationTag="SearchPanel"
                         Padding="0"
                         >
            <StackPanel Grid.Row="0" Grid.Column="0" VerticalAlignment="Top" Orientation="Horizontal" DataContext="{StaticResource ResourceKey=dongleViewModel}"
                          
                        >
 
                <TextBox x:Name="mainSearchBox" Width="150" Margin="2"
                          Height="25"
                         ></TextBox>
                <Button x:Name="BtnSearch" Margin="2" ToolTip="Universal Search" Style="{StaticResource IconButtonStyleA}"
                            Click="BtnSearch_OnClick">
                    <Image Source="..\Images\icons\icandies\16\find.png"/>
                </Button>
            </StackPanel>
        </telerik:RadPane>
    </telerik:RadPaneGroup>
    <telerik:RadPaneGroup x:Name="LeftPanelGroup2"
                          telerik:RadDocking.SerializationTag="LeftPanelGroup2"
                           telerik:ProportionalStackPanel.RelativeSize="100, 100"
                          >
        <telerik:RadPane Header="Recently Viewed" Tag="RecentlyItems"
                         telerik:RadDocking.SerializationTag="RecentItems"
                         Padding="0"
                         >
            <StackPanel>
            <telerik:RadListBox x:Name="radListBox" HorizontalAlignment="Stretch"
            ItemsSource="{Binding recentItems}"
                                Style="{StaticResource CustomRadListBoxStyle}"
                                ItemContainerStyle="{StaticResource CustomRadListBoxItemStyle}"
                                MouseDoubleClick="RecentItems_DbClick">
            </telerik:RadListBox>
            </StackPanel>
 
        </telerik:RadPane>
 
    </telerik:RadPaneGroup>
</telerik:RadSplitContainer>

 

 

0
Kalin
Telerik team
answered on 28 May 2015, 10:43 AM
Hi,

In the current version of RadDocking setting the Width, MaxWidth, MinWidth or Height, MaxHeight, MinHeight to any of its elements (RadSplitContainer, RadPaneGroup or RadPane) is not supported by the control. We have a logged feature request in our feedback portal for providing such built-in feature in the control. You can vote for it and track its status here. You can try setting MaxHeight of the one of the outer controls (of the Docking for example) and set such a relative size of the first PaneGroup that would guarantee you a max height of 30 for it.

Hope this helps.


Regards,
Kalin
Telerik
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
Tags
Docking
Asked by
Ujjwal Lahoti
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Ujjwal Lahoti
Top achievements
Rank 1
Davy Tavernier
Top achievements
Rank 1
Daniel B.
Top achievements
Rank 1
Kalin
Telerik team
Share this question
or