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

Custom Dialog Underneath ToolWindows

2 Answers 83 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 29 May 2012, 08:03 PM
I have created a custom popup user control. This control covers the entire application with a gray semi-transparent overlay with a message in the middle. 

I add the control like this which makes it the last control in the grid and putting it on top of all other objects.
Grid mainGrid = (Grid)App.Current.MainWindow.Content;
mainGrid.Children.Insert(mainGrid.Children.Count, this);

I have a docking control in this grid and as long as everything is docked the overlay works great. However, as soon as I pull one of the RadPanes into a separate ToolWindow that tool window is always on top of my overlay user control. Is there anyway to do an overlay that would be on top of the ToolWindow as well?

2 Answers, 1 is accepted

Sort by
0
Accepted
George
Telerik team
answered on 01 Jun 2012, 03:05 PM
Hello James,

This behavior is expected. The control that covers the entire application with overlay is on the top of all visual elements in the MainWindow, but the ToolWindows in WPF are placed in separates windows. This is the reason why they stay on top of the the overlay control. In this scenario, I would suggest placing the control in a topmost window.

Hope this helps.

 
Greetings,
George
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Dev
Top achievements
Rank 1
answered on 04 Jun 2012, 11:52 PM
I figured that behavior was expected. I was hoping there would be an easy way to change that, but I should have known better. After a lot of trial and error I finally got what I needed out of a Window. I had to do things like Set TopMost to true with the application was activated and False when deactivated so that my popup wasn't on top of all applications and set the Popup window size and location everytime the window moved, re-sized or state changed. I also had to create an overlay for each ToolWindow in the application.  Here is a sample of what I ended up doing for anyone else looking for a similar effect. The code could be cleaned up a little but it works.
Tags
Docking
Asked by
Dev
Top achievements
Rank 1
Answers by
George
Telerik team
Dev
Top achievements
Rank 1
Share this question
or