I have two problems about docking control
1. I don't want to let dragging panes outside the window of app, is there any property I can set?
2. When I add new panes programmically, if there are to many panes on the docking area, the latest pane will be added below the old panes, cause docking do not auto resize the panes, how could I solve this problem?
Thanks for your answer!
5 Answers, 1 is accepted
Thank you for contacting us.
- You can use IsRestricted and the RestrictedAreaMargin properties of the RadWindow control.
Setting IsRestricted property to true prevents the user from dragging the RadWindow off the screen.RestrictedAreaMargin property sets margin area of the window for the plugin.
You can find more information here. -
If you could give us some more details on that it would be very helpful. Sending us a sample project or a screenshot will be really helpful.
I hope this information helps. I will be glad to assist you further.
George
the Telerik team
Thanks for your answer!
About second problem, this is sample code, if I add to many panes, the panes will outside the window. Could the pane resize automatically? I also try to add an ScrollBar on the RadDocking, but it seems not be supported.
<Window x:Class="Window1" |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
Title="Window1" Height="300" Width="300" xmlns:my="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"> |
<Grid> |
<my:RadDocking HasDocumentHost="False" Height="auto" Width="auto" Margin="0,27,0,0" Name="RadDocking1" > |
<my:RadSplitContainer > |
<my:RadPaneGroup> |
<my:RadPane/> |
</my:RadPaneGroup> |
</my:RadSplitContainer> |
</my:RadDocking> |
<Button Height="28" Name="Button1" VerticalAlignment="Top">Button</Button> |
</Grid> |
</Window> |
Imports Telerik.Windows.Controls |
Class Window1 |
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.Windows.RoutedEventArgs) Handles Button1.Click |
Dim radpane As New RadPane |
Dim radpanegroup As New RadPaneGroup |
Dim radsplitcontainer As New RadSplitContainer |
radpanegroup.Items.Add(radpane) |
radsplitcontainer.Items.Add(radpanegroup) |
RadDocking1.Items.Add(radsplitcontainer) |
End Sub |
End Class |
Thank you for contacting us.
The code-behind code you use adds many RadSplitContainers with one RadPaneGroup with one RadPane in each group. So, if you want to resize all panes, you shouldn't create splitcontainers. You need only 1 RadSplitContainer with many RadPaneGroups:
<
Window
x:Class
=
"Window1"
Title
=
"Window1"
Height
=
"300"
Width
=
"300"
xmlns:my
=
"clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"
>
<
Grid
>
<
my:RadDocking
HasDocumentHost
=
"False"
Height
=
"auto"
Width
=
"auto"
Margin
=
"0,27,0,0"
Name
=
"RadDocking1"
>
<
my:RadSplitContainer
x:Name
=
"rootSplitContainer"
>
<
my:RadPaneGroup
>
<
my:RadPane
/>
</
my:RadPaneGroup
>
</
my:RadSplitContainer
>
</
my:RadDocking
>
<
Button
Height
=
"28"
Name
=
"Button1"
VerticalAlignment
=
"Top"
>Button</
Button
>
</
Grid
>
</
Window
>
Imports
Telerik.Windows.Controls
Class
Window1
Private
Sub
Button1_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.Windows.RoutedEventArgs)
Handles
Button1.Click
Dim
radpane
As
New
RadPane
Dim
radpanegroup
As
New
RadPaneGroup
radpanegroup.Items.Add(radpane)
rootSplitContainer.Items.Add(radpanegroup)
End
Sub
End
Class
I hope this information helps. I will be glad to assist you further.
George
the Telerik team
If I add new Radsplitcontainer in RadDocking control programmically, I can set InitialPosition property of radsplicontainer to decide where to dock. But if I add new RadPaneGroup in RadSplitContainer, I can't find such property to decide where to dock, could you give me some advice? Thanks.
Thank you for getting back to us.
The property InitialPosition is for the RadSplitContainers. You can place a RadPaneGroup inside of a RadSplitContainer and set its InitialPosition.
You can find any additional information about RadPanes, RadPaneGroups and RadSplitContainers in our online documentation.
Also, could you please open a new forum post for any different issues that you experience with our controls. In that way we will be able to assist you in a timely manner and it will be more convenient for the other users to go through the posts.
Please do feel free to contact us if you require any further information.
Sincerely yours,
Georgethe Telerik team