tags:

views:

81

answers:

1

I write application in WPF and C#.

I have 2 windows: MainWindow and ToolWindow. I'd like to have ToolWindow stick to the edge of the MainWindow and be always below MainWindow. When ToolWindow gets focus it is on top (with the glow around the edges) MainWindow. The user should be able to use ToolWindow but MainWindow must be on top of the ToolWindow.

Do you have any idea how to do that?

+2  A: 

To set a window on Top use TopMost property

 Topmost = true;

If you want to access the MainWindow and ToolWindow simutaniously use Show() instead of ShowDialog()

ToolWindow toolWindow = new ToolWindow();
toolWindow.Show();
Sauron
If I set Topmost = True; the MainWindow will be on top of all the windows in the system, it is not desirable.
neochrysaor
Set the TopMost for ToolWindow.
Sauron