wpf窗口无法在windows10的屏幕保护程序中刷新。 [英] wpf window can't refresh in screensaver of windows10.

查看:90
本文介绍了wpf窗口无法在windows10的屏幕保护程序中刷新。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

WPF窗口无法在windows10的屏幕保护程序中刷新。

解决方案


也许你可以尝试检查当前登录用户是否已更改,然后使用

InvalidateVisual()
更新布局。


https://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.sessionswitch(v = vs.110).aspx


您还可以检查屏幕保护程序是否正在运行,请参阅:


https://stackoverflow.com/questions/4516179/detecting - 这个用户远离网络的电脑


此致,


Bob


WPF window can't refresh in screensaver of windows10.

解决方案

Hi,

Maybe you can try to check currently logged-in user has changed, then refesh wpf application element by using InvalidateVisual() to update the layout.

https://msdn.microsoft.com/en-us/library/microsoft.win32.systemevents.sessionswitch(v=vs.110).aspx

You can also check if a screen saver is running, see:

https://stackoverflow.com/questions/4516179/detecting-that-the-user-is-away-from-the-pc-with-net

Sincerely,

Bob


这篇关于wpf窗口无法在windows10的屏幕保护程序中刷新。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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