0
votes

I have a WPF application that I'd like to maintain on top of the taskbar.

The issue is that whenever you interact with the taskbar, the program goes underneath and stays there.

Example: Overlay example

What I've tried:

  • Activate() Takes control of the keyboard and removes focus from current application, don't want that
  • BringToView() Did not bring window on top of taskbar
  • Show() Did not bring window on top of taskbar
  • Activate() -> ClearFocus() would steal focus still

Some properties of the window:

  • WindowStyle="None"
  • Topmost="True"

The preferred behavior is that if the taskbar were to go on to, it would then return once the action with the taskbar is complete. It would preferably also not steal focus at any point from the keyboard or any other process.

I've looked across various questions here and MSDN but haven't had anything work yet.

1

1 Answers

1
votes

You mean a topmost state like the on-Screen Keyboard?

Not a chance with default tools. The on-screen Keyboard can pull that off, because it is actually part of the Windowing System. Just like the Taskbar and Start Menu. Just like the different UI elements are part of your Window. But a image you host in it, is only a guest.

It would be one thing if you could intercept and draw on top of the Video Signal. It is possible but a good way away from WPF.