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

4 posts, 0 answers
  1. Luis Rizo
    Luis Rizo avatar
    12 posts
    Member since:
    Jul 2009

    Posted 15 Dec 2009 Link to this post

    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.




  2. Luis Rizo
    Luis Rizo avatar
    12 posts
    Member since:
    Jul 2009

    Posted 15 Dec 2009 Link to this post

    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.
  3. Luis Rizo
    Luis Rizo avatar
    12 posts
    Member since:
    Jul 2009

    Posted 15 Dec 2009 Link to this post

    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.
  4. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 16 Dec 2009 Link to this post

    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.
Back to Top