I want my window to be on top of all other windows in my application only. If I set the TopMost property of a window, it becomes on top of all windows of all applications and I don't want that.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
I too faced the same problem and followed Google to this question. Recently I found the following worked for me.
Instead you can use a Popup that will be TopMost always, decorate it similar to a Window and to attach it completely with your Application handle the LocationChanged event of your main Window and set IsOpen property of Popup to false.
Edit:
I hope you want something like this:
Hope it helps!!!
There are several threads, there's even a "topmost" tag. Search on that, or go directly to this post which looks good:
How to keep a window on top of all other windows in my application only?
Here's a way to do it: make your "topmost" window subscribe to your other windows GotFocus and LostFocus events and use the following as the event handlers:
You can add this to your windows tags
Then you can also display it if you want your users to acknowledge it in order to proceed
First try it without TopMost parameters and see the results.
Try this: