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

Don't let dragging panes outside the window

5 Answers 44 Views
Docking
This is a migrated thread and some comments may be shown as answers.
kj
Top achievements
Rank 1
kj asked on 21 Jun 2010, 05:43 PM
Hi,

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

Sort by
0
George
Telerik team
answered on 23 Jun 2010, 05:45 PM
Hello kj,

Thank you for contacting us.


  1. 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.
  2. 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.

Sincerely yours,
George
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
kj
Top achievements
Rank 1
answered on 23 Jun 2010, 06:31 PM
Hi,

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.ObjectByVal 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 

0
George
Telerik team
answered on 25 Jun 2010, 05:17 PM
Hello kj,

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.
 


Greetings,
George
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
kj
Top achievements
Rank 1
answered on 22 Jul 2010, 04:17 PM
Hi,

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.  
0
George
Telerik team
answered on 27 Jul 2010, 03:35 PM
Hello kj,

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,

George
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
Tags
Docking
Asked by
kj
Top achievements
Rank 1
Answers by
George
Telerik team
kj
Top achievements
Rank 1
Share this question
or