Window Hud Behavior (Pass through clicks, can't be minimized)

拥有回忆 提交于 2019-12-23 04:39:09

问题


I'd like to write a simple HUD style application using WPF (if I'm using the wrong technology, I'll take suggestions).

As a simple example, I'd to place text along the top of the screen like "Library Computer" that ignores all clicks (ie doesn't effect the rest of Windows) but is always on top and can't be minimized.


回答1:


Relevant properties to set on the window:

  • AllowsTranparency -> true
  • WindowStyle -> None
  • ResizeMode -> NoResize
  • WindowState -> Maximized
  • Topmost -> true
  • IsHitTestVisible -> false (This alone won't do, you need some OS interop)


来源:https://stackoverflow.com/questions/9314600/window-hud-behavior-pass-through-clicks-cant-be-minimized

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!