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
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.
Does this mean, to provide a width/Height to a RadPane, can I create a SplitContainer with only one item? Would this work?
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.
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.
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?
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.
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
@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
>
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