WPF 窗口对象在 Windows 10 的第二个屏幕上被涂黑 [英] WPF Window objects are blacked out on second screen in Windows 10

查看:31
本文介绍了WPF 窗口对象在 Windows 10 的第二个屏幕上被涂黑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果这是一个技术问题而不是软件编程问题,请原谅我,但我很难确定这里的可能原因,无论是 .NET Framework 还是较低级别的东西,也许是图形硬件.本质上,WPF 应用程序不会在使用我的 Windows 10 Alienware 13 笔记本电脑的第二台显示器上运行.在我的 Windows 8 Alienware 15 下运行的同一个显示器上的同一个应用程序可以正常工作.Visual Studio 2015 是一个类似的情况,如果可能有一个共同的因素.任何有关此类问题的经验将不胜感激

Forgive me if this is a technical issue rather than a software-programming one, but I am having difficulty determining the probable cause here, be it the .NET Framework or something lower level, perhaps graphics hardware. Essentially, no WPF application will run on a second monitor using my Windows 10 Alienware 13 laptop. The same application, on the same monitor, running under my Windows 8 Alienware 15, will work fine. Visual Studio 2015 is a similar case, if there might be a common factor. Any experience with this sort of issue would be appreciated

推荐答案

对我来说,问题似乎出在 WPF 应用程序中的硬件加速上,因为禁用它会使问题无法重现(以前我没有遇到任何问题)使用 winkey+arrows 将 WPF 从主屏幕移动到辅助屏幕)

For me, the issue seems to be in the hardware acceleration in WPF applications, as disabling it made it impossible to reproduce the problem (which previously I had no trouble doing using winkey+arrows to move WPF from primary to secondary screen)

以下注册表编辑可用于禁用 WPF 应用程序内的硬件加速:

The following registry edit can be used to disable hardware acceleration inside WPF applications:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Microsoft\Avalon.Graphics]
"DisableHWAcceleration"=dword:00000001

来源:

https://support.microsoft.com/en-us/kb/963021

https://msdn.microsoft.com/en-us/library/aa970912.aspx

这篇关于WPF 窗口对象在 Windows 10 的第二个屏幕上被涂黑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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