WPF 中的无边框窗口
我想要无边框窗口,类似于我所附的图像;我该怎么做?
谢谢 海洋
I want to have Borderless window similar to image I have attached; how can I do this ?
Thanks
Ocean
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以通过使窗口透明并将 windowStyle 设置为 None 来摆脱默认镶边,并且需要提供样式按钮而不是右上角的常规按钮
You can get rid of the default chrome by making the window transparent and windowStyle to None, and need to provide styled buttons instead of the regular buttons on the top-right
如果您想避免最大化时窗口覆盖任务栏等问题,请使用 Microsoft WPF Shell 集成库
If you want to avoid issues like windows covering the taskbar when maximized, etc. use the Microsoft WPF Shell Integration Library
我还有一些我之前写的代码,我认为涵盖了所有基本的窗口问题,从对齐到取消对齐、在适当的监视器上最大化、不覆盖任务栏等。看一下在它。
WPF 无边框窗口问题:Aero Snap &最大化
I also have some code that I wrote a little bit ago which I THINK covers all the basic windowing problems, from snapping, to unsnapping, maximizing on proper monitor, not covering task bar, etc. Take a look at it.
WPF Borderless Window issues: Aero Snap & Maximizing