没有玻璃效果本土航空模糊上的满幅WPF窗口

没有玻璃效果本土航空模糊上的满幅WPF窗口

本文介绍了没有玻璃效果本土航空模糊上的满幅WPF窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 据我所知,类似的问题已被提问和回答。 。矿,但是,是一个问题三个部分。I am aware that similar questions have been asked and answered. Mine, however, is a three-part question.有关这个问题的目的,请记住以下几点:For the purposes of this question, keep the following in mind: 我是一个业余爱好者,早期大学本科学习计算机科学。我在复杂的编程非常不熟练,但我能理解大多数的术语。 这是使用VB.NET在Visual Studio中创建一个WPF项目,但我可以很轻松地阅读C#由于语言'相似。 这是我第一次与任何DWM API的尝试。首先,是有可能使用在一个无国界的窗口背景的玻璃效果?如果是的话(我相信它是),这是怎么做的?First and foremost, is it possible to use the glass effect in the background of a borderless window? If so (and I believe it to be), how is this done?此外,由于Windows 8和更新不再使用半透明的玻璃效果,可这仍然是在这些操作系统上做了什么?Additionally, since Windows 8 and newer no longer use the translucent glass effect, can this still be done on those operating systems?我要顺利本土DWM模糊效果,但我不希望有光泽的玻璃覆盖,而我不希望窗口颜色预定义在用户的主题设置I want the smooth native DWM blur effect, but I don't want the glossy glass overlay, and I don't want the window color predefined in the user's theme settings.是否有可能这种效果只适用于窗口的某一部分?更重要的,是有可能进行调整的模糊效应的强度(半径)Is it possible to only apply this effect to a certain portion of the window? More importantly, is it possible to adjust the intensity (radius) of the blurring effect?根据要求,我已经发布的我想达到的效果的一些例子。By request, I have posted some examples of the effect I wish to achieve.图片以上是我的WPF应用程序的实际截图(在作品中仍然)。其简约的设计在很大程度上依赖于运动和窗口大小调整的动画。The image above is an actual screenshot of my WPF application (still in the works). Its minimalist design relies heavily on animation of movement and window resizing.使用一些Photoshop技巧,我已经渲染上面的图片,展示我想创建的效果,的究竟的我想要的方式。请注意以下几点:Using some photoshop skills, I've rendered the image above, demonstrating the effect I want to create, exactly the way I want it. Note the following: 的模糊效果有一个比通常的Aero模糊效果 更高的半径(强度)的模糊是只在Windows 的模糊不从桌面上的绿色主题继承其颜色推荐答案既然你正在努力实现的与其说是透明+模糊的玻璃效果,但更可以使用。下面的方法来模糊窗口后面1. Applying Aero Glass to Borderless WindowSince what you are trying to achieve is not so much a glass effect but more of a transparent+blur you can use the following methods to blur behind the window. Windows 7中:您可以使用的DwmEnableBlurBehindWindow 模糊的窗口后面。Windows 7: you can use DwmEnableBlurBehindWindow to blur behind the window. 窗口8 :我没有带发现了一个可行的解决方案,因为DwmEnableBlurBehindWindow在Windows 8中删除Window 8: I havn't found a workable solution since DwmEnableBlurBehindWindow was removed in Windows 8. 的Windows 10 :您可以使用 SetWindowCompositionAttribute 窗户后面模糊。Windows 10: you can use SetWindowCompositionAttribute to blur behind the window.以上解决方案将只适用于窗户后面模糊效果,这将是到窗口来定义透明度和色彩。The above solutions will only apply a blur effect behind the window, it will be up to the window to define transparency and colour.通过这些方法,你只能模糊整个窗口下方,这将是由你来窗口的部分使用alpha通道,你希望是透明的。我不认为你可以定义模糊半径。With these approaches you can only blur underneath the entire window, and it will be up to you to use an alpha channel on portions of the window you want to be transparent. I don't think you can define the blur radius either. 这篇关于没有玻璃效果本土航空模糊上的满幅WPF窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
09-02 22:00