Custom Dialog Underneath ToolWindows

3 posts, 1 answers
  1. Tom
    Tom avatar
    38 posts
    Member since:
    Mar 2007

    Posted 29 May 2012 Link to this post

    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. Answer
    George
    Admin
    George avatar
    1332 posts

    Posted 01 Jun 2012 Link to this post

    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 >>

  3. UI for WPF is Visual Studio 2017 Ready
  4. Tom
    Tom avatar
    38 posts
    Member since:
    Mar 2007

    Posted 04 Jun 2012 Link to this post

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