简体   繁体   中英

window being on top of the other windows in application

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?

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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM