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

How to put some control on the top of RadDocking

2 Answers 69 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Maxime asked on 02 Oct 2012, 03:25 PM

I want to do something really simple. 
I want to put one control (or userControl, whatever) on the top of RadDocking.
I'm working with silverlight 5 and C#.

I can do that with Canvas and Canvas.ZIndex
Just like this:
<Grid x:Name="LayoutRoot" Background="White">
    <Canvas Height="1000" Width="1000"
        <docking:RadDocking Canvas.Left="0" Canvas.Top="0" Canvas.ZIndex="0" Height="500" Width="500">
                    <docking:RadPane Header="Test" Canvas.ZIndex="1">
                        <TextBlock Text="test" Foreground="Black"/>
        <Border Background="Red" Height="50" Width="50" Canvas.Top="25" Canvas.Left="25" Canvas.ZIndex="3"/>
        <Border Background="Green" Height="50" Width="50" Canvas.Top="0" Canvas.Left="0" Canvas.ZIndex="2"/>

So i can see, when my RadPane "Test" is docked, it's appear under my borders. That's what i want.
But, when i drag my pane to put it into an other docking, the RadPane go on the top, on my borders.
But i don't want that.
I want that my borders are always on the Top. Even if my RadPane is floating.
It is possible to do that ? 

To resume, i want to do something like the compass do.
When i drag my RadPane, i can see the Compass are always above my RadDocking.
I want to do the same thing.

Thank you.


2 Answers, 1 is accepted

Sort by
Telerik team
answered on 03 Oct 2012, 01:21 PM
Hi Maxime,

When RadPanes are in floated state, they're placed in ToolWindow. ToolWindows are hosted in popup controls and are not part of the same visual tree as the Borders.  That's why you cannot place the Borders over the ToolWindow.

the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Top achievements
Rank 1
answered on 03 Oct 2012, 01:42 PM
Ok i understand,
So, there is no way to put something on the ToolWindow ? 
If i'm good, when i drag a RadPane, it's create a ToolWindow with de RadPane into it.
It's like a popup, but we can see the Compass is ON the ToolWindow, and i want to do the same thing myself. I guess it's possible.
But, how ? 


I have found something really interesting. 
On a RadDocking, i catch the event LayoutChangeStarted.
In this event, i can get the ActivePane 

void mainDock_LayoutChangeStarted(object sender, EventArgs e)
            var activePane = ((RadDocking)sender).ActivePane;

With my activePane, I can get the ToolWindow like this

var currentToolWindow = activePane.GetParentOfType<ToolWindow>();

With the currentToolWindow, I thougnt I could take the parent, and play with it. It's the case.

I can do something like that

var canvas = currentToolWindow.GetParentOfType<Canvas>();

When I do that, i can put something on everything.


Asked by
Top achievements
Rank 1
Answers by
Telerik team
Top achievements
Rank 1
Share this question