窗口 Hud 行为(通过点击,无法最小化)
我想使用 WPF 编写一个简单的 HUD 样式应用程序(如果我使用了错误的技术,我会接受建议)。
举一个简单的例子,我将文本沿着屏幕顶部放置,例如“图书馆计算机”,它会忽略所有点击(即不会影响 Windows 的其余部分),但始终位于顶部并且无法最小化。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
要在窗口上设置的相关属性:
AllowsTranparency
->true
WindowStyle
->无
ResizeMode
->NoResize
WindowState
->最大化
最上面
->true
IsHitTestVisible
->false
(仅此是不行的,您需要一些操作系统互操作)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)