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

Inserting a User Control that has Docking in Main Page which also has Docking

3 Answers 86 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Luis Rizo
Top achievements
Rank 1
Luis Rizo asked on 15 Dec 2009, 04:56 PM
Hi,

I'm basically trying to insert a user Control in a big RadDockPane. This works fine. The problem I'm encountering is when I try to divide the two components in my user control with docking elements. When I try to insert the User Control with the docking elements, my application crashes instantly.

In my main page I have the following:
  
...
<docking:RadPane.Content> 
   <local:TestControl x:Name="TControl1"/> 
</docking:RadPane.Content>
....

Note that the above works when I don't use any of the RadDock elements inside my "TestControl".

In my TestControl I also have something very simple:
<UserControl x:Class="MyClass.TestControl" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"  
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
    xmlns:navigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
    xmlns:docking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking" 
    Width="Auto" Height="Auto"
    <Canvas> 
        <docking:RadDocking > 
            <docking:RadSplitContainer> 
                <docking:RadPaneGroup> 
                    <docking:RadPane Width="200"
                        <docking:RadPane.Content> 
                            <TextBlock Text="Content1" /> 
                        </docking:RadPane.Content> 
                    </docking:RadPane> 
                </docking:RadPaneGroup> 
            </docking:RadSplitContainer> 
            <docking:RadSplitContainer> 
                    <docking:RadPaneGroup> 
                         <docking:RadPane Width="800"
                        <docking:RadPane.Content> 
                            <TextBlock Text="Content2" /> 
                        </docking:RadPane.Content> 
                    </docking:RadPane> 
                    </docking:RadPaneGroup> 
            </docking:RadSplitContainer> 
        </docking:RadDocking> 
    </Canvas> 
</UserControl> 

Any hints on this?

Thanks in advance.




3 Answers, 1 is accepted

Sort by
0
Luis Rizo
Top achievements
Rank 1
answered on 15 Dec 2009, 05:09 PM
I just traced the code and saw the Exception message saying that nested Dock controls is currently unsupported.

I enabled AllowUnsafeMode in the inner Dock control and it seems to at least run. However, as expected, some of the dock's functionality doesn't work quite as expected.

Really, all I would like to do is be able to auto-hide one, or both the components of my inner control. At the moment, it looks like the inner dock control does not contain an Auto-Hide area, so when I auto-hide it, it auto-hides in the parent controls Auto Hide area (which isn't really what I want). When the user clicks to auto-hide, I would like an auto-hide area inside the child dock control.

Any hints, ideas, or work-arounds on how to accomplish this? Any chance you folks are working on implementing this functionality in the next release?

Thanks very much.
0
Luis Rizo
Top achievements
Rank 1
answered on 15 Dec 2009, 07:27 PM
I realized that using a RadExpander control in my child User Control would work for what I wanted to accomplish, so this is the route I went.

The setup now contains the dock in the main page, and the content of one of the Panes is set to the child user control. The child user control then uses the expander to host all of its internal components. This way I can show and hide as necessary.
0
Miroslav Nedyalkov
Telerik team
answered on 16 Dec 2009, 04:12 PM
Hi Luis,

 As you noticed this functionality is not working very well yet and because of that it is not enabled. Your work-around sounds good, so thank you for sharing your idea with us.


Sincerely yours,
Miroslav Nedyalkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Docking
Asked by
Luis Rizo
Top achievements
Rank 1
Answers by
Luis Rizo
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or