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

TabControl and Docking

9 Answers 124 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Johnny
Top achievements
Rank 1
Johnny asked on 09 Oct 2009, 01:05 PM
All,
I have a TabControl which has a Docking control within it.  When I move the panes around outside of the docking, they always go under the TabControl.  I've played with the ZIndex of these items with not luck.  Any thoughts?
Thanks,
Johnny

9 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 15 Oct 2009, 08:47 AM
Hello Johnny,

What I could suggest you is to change the control template of the Docking control and add a popup around the PopupCanvas control. We removed this popup by default as it causes some problems when you include the Docking control in an animation, when you put the Docking control in other popups, etc., but you can still put it back if you are not in any of these scenarios. Here is an example:
<telerikDocking:RadDocking.Template>
    <ControlTemplate TargetType="telerikDocking:RadDocking">
        <Grid x:Name="LayoutRoot">
            <Border Background="{TemplateBinding BorderBrush}"
                    BorderBrush="{TemplateBinding BorderBrush}"
                    BorderThickness="{TemplateBinding BorderThickness}"
                    Padding="{TemplateBinding Padding}">
 
                <telerik:RadDockPanel x:Name="RootDockPanel">
                    <!--TODO Add margin to compensate for not overlapping the other auto-hide areas (everywhere)-->
                    <dock:AutoHideArea x:Name="LeftAutoHide"
                            telerik:RadDockPanel.Dock="Left"
                            TabStripPlacement="Left"
                            BackgroundVisibility="Collapsed"
                            TabOrientation="Vertical" />
                    <dock:AutoHideArea x:Name="RightAutoHide"
                            BackgroundVisibility="Collapsed"
                            telerik:RadDockPanel.Dock="Right"
                            TabStripPlacement="Right" TabOrientation="Vertical" />
                    <dock:AutoHideArea x:Name="TopAutoHide"
                            BackgroundVisibility="Collapsed"
                            telerik:RadDockPanel.Dock="Top"
                            TabStripPlacement="Top" />
                    <dock:AutoHideArea telerik:RadDockPanel.Dock="Bottom"
                            BackgroundVisibility="Collapsed"
                            TabStripPlacement="Bottom" x:Name="BottomAutoHide" />
                    <telerikDocking:DockingPanel x:Name="ContentDockPanel"
                            Background="{TemplateBinding Background}">
                        <!--Panes comes here.-->
 
                        <!--<dock:DocumentHost x:Name="DocumentHost"
                        Content="{TemplateBinding DocumentHost}"
                        Visibility="{Binding HasDocumentHost, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}" />-->
                        <dock:DocumentHost x:Name="DocumentHost"
                                Content="{TemplateBinding DocumentHost}" />
 
                    </telerikDocking:DockingPanel>
                </telerik:RadDockPanel>
 
            </Border>
            <Popup IsOpen="True">
            <Canvas x:Name="PopupPanel">
                <dock:VisualCue x:Name="PART_DragCue" Canvas.ZIndex="999997"
                        Style="{TemplateBinding VisualCueStyle}">
                    <dock:VisualCue.RenderTransform>
                        <TranslateTransform />
                    </dock:VisualCue.RenderTransform>
                </dock:VisualCue>
                <dock:RootCompass x:Name="PART_RootCompass"
                        RenderTransformOrigin="0.5, 0.5"
                        Style="{TemplateBinding RootCompassStyle}"
                        Visibility="Collapsed" Canvas.ZIndex="999998">
                    <dock:RootCompass.RenderTransform>
                        <TranslateTransform />
                    </dock:RootCompass.RenderTransform>
                </dock:RootCompass>
                <dock:Compass x:Name="PART_Compass"
                        RenderTransformOrigin="0.5, 0.5"
                        Style="{TemplateBinding CompassStyle}"
                        Visibility="Collapsed" Canvas.ZIndex="999999">
                    <dock:Compass.RenderTransform>
                        <TranslateTransform />
                    </dock:Compass.RenderTransform>
                </dock:Compass>
            </Canvas>
            </Popup>
        </Grid>
    </ControlTemplate>
</telerikDocking:RadDocking.Template>

The dock xml namespace is defined as xmlns:dock="clr-namespace:Telerik.Windows.Controls.Docking;assembly=Telerik.Windows.Controls.Docking".

Hope this helps.

Regards,
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.
0
Johnny
Top achievements
Rank 1
answered on 16 Oct 2009, 03:53 PM
Thanks for the advice, but I'm not completely sure that I understand the solution.  I have a tab control with tabitems and then a docking control within each of those.  On moving a pane within one of the docking controls, they will appear as if they are behind the tabs when moved to that area of the screen.  Thanks for all of your help.
Thanks,
Johnny
0
Miroslav Nedyalkov
Telerik team
answered on 20 Oct 2009, 12:11 PM
Hi Johnny,

Yes, I've tried your scenario and I noticed that the TabStripPanel of the TabControl appears "over" the floating ToolWindows. Because of that I suggested you to change to ControlTemplate of the Docking control and to wrap the Canvas called PopupPanel in Popup control, because the Docking control uses this canvas internally to put the floating ToolWindows in it and if it is in a Popup control, the ToolWindows will appear "over" the TabStrip. Is this the searched effect?

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.
0
Johnny
Top achievements
Rank 1
answered on 23 Oct 2009, 09:11 PM
Perfect.  I apologize for the miscommunication.  Thanks so much for your help.
-Johnny
0
Kirill Prokopenko
Top achievements
Rank 1
answered on 05 Nov 2009, 05:39 PM
I posted it in wrong question sorry
0
Johnny
Top achievements
Rank 1
answered on 21 Dec 2009, 07:22 PM
All,
I have implemeted the template as you had suggested.  Everything works well, but it looks like the section where you have mentioned (<!--Panes comes here.-->) needs to be implemented now as without it the panes disappear when switching tabs.  What needs to be within this section.  I am having some difficulty with this.  I am adding these panes programmatically, but understand that they must still have a template...just not sure what needs to be contained within it.
Thanks,
Johnny

0
Miroslav Nedyalkov
Telerik team
answered on 22 Dec 2009, 12:48 PM
Hi Johnny,

 I think I sent you a wrong ControlTemplate - the XAML:

<dock:DocumentHostx:Name="DocumentHost"
                        Content="{TemplateBinding DocumentHost}"
                        Visibility="{Binding HasDocumentHost, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BooleanToVisibilityConverter}}" />

shouldn't be commented out. Could you please uncomment it?

 If you still have problems with this, please open a support ticket and send us a sample project - we will investigate the problem let you know how to fix it.

Greetings,
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.
0
John Benson
Top achievements
Rank 1
answered on 05 Feb 2010, 08:35 PM
Hey, I'm having the same problem as Johnny.

I used the provided ControlTemplate and the panes would still be visible when outside the DockingPanel but when I would switch tabs and left one of the panes floating, it would disappear when switching back to that tab while tabs that were docked would still be visible.

Is there a solution for this? Thanks in advance.


0
Miroslav Nedyalkov
Telerik team
answered on 08 Feb 2010, 11:44 AM
Hi John,

 Please, find the attached project that demonstrates how to achieve this. The code that takes care of this is the code-behind of the MainPage.

Kind regards,
Miroslav Nedyalkov
the Telerik team

Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Follow the status of features or bugs in PITS and vote for them to affect their priority.
Tags
General Discussions
Asked by
Johnny
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Johnny
Top achievements
Rank 1
Kirill Prokopenko
Top achievements
Rank 1
John Benson
Top achievements
Rank 1
Share this question
or