Window Hud行为(通过点击传递,无法最小化) [英] Window Hud Behavior (Pass through clicks, can't be minimized)

查看:104
本文介绍了Window Hud行为(通过点击传递,无法最小化)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用WPF编写一个简单的HUD风格的应用程序(如果使用的技术错误,我会提出建议).

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

作为一个简单的示例,我会将文本放置在屏幕顶部,例如图书馆计算机",该文本会忽略所有点击(即,不会影响Windows的其余部分),但始终位于顶部,并且不能最小化.

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.

推荐答案

要在窗口上设置的相关属性:

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)

这篇关于Window Hud行为(通过点击传递,无法最小化)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆