gpt4 book ai didi

c# - 当 Window AllowsTransparency = true 时 WPF 硬件加速了吗?

转载 作者:太空狗 更新时间:2023-10-29 22:37:29 25 4
gpt4 key购买 nike

我一直在考虑在 WPF 中制作我自己的窗口框架,类似于 Visual Studio。我读过设置 AllowsTransparency = true 会强制 WPF 在软件模式下呈现。 This example是我困惑的根源(强调我的),其中指出:

Complete customization of WPF window can be done only when AllowsTransparency is set to "True", which causes that the window is software rendered which might be not as fast GPU rendering.

但是,我在别处读到,通过窗口分层,您可以获得硬件加速,而这正是 WPF 所做的。我还发现很难想象 Visual Studio 2013 - 具有自定义框架和透明边框模糊 - 会被软件渲染。

这个问题是否有明确的答案(假设 Windows 7 及更高版本),当 Window AllowsTransparency 为真时 WPF 硬件加速了吗?

最佳答案

似乎透明窗口 (AllowsTransparency = true) 是针对 Windows Vista 及更高版本的硬件加速:HW Acceleration of Layered Windows

还有一个修补程序可以使其在 Windows XP 下也能正常工作:http://support.microsoft.com/kb/937106/en-us

关于c# - 当 Window AllowsTransparency = true 时 WPF 硬件加速了吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21576016/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com