HandyControl icon indicating copy to clipboard operation
HandyControl copied to clipboard

软件刚打开界面容易黑屏,需要拖动才刷新

Open lishuangquan1987 opened this issue 4 years ago • 10 comments

image

lishuangquan1987 avatar Sep 24 '19 11:09 lishuangquan1987

It looks like a driver problem. Try to update them.

Otherwise, if your environment is on a virtual machine, disable the hardware acceleration that does not support WPF applications.

If it doesn't work, maybe the installation of your .NET Framework or Windows theme is corrupted.

cyoann avatar Sep 24 '19 12:09 cyoann

我的电脑上也是这样,哈哈

wj60387 avatar Sep 25 '19 01:09 wj60387

It's not the driver problem,my system is WIN7,and it has been installed all versions of .NET Framework, there's no problem when other wpf applications run on it

lishuangquan1987 avatar Sep 25 '19 13:09 lishuangquan1987

看起来是渲染没刷新,试试安装一下显卡驱动,其他软件没问题可能是没有用 BitmapCache 试试你创建一个动画加上缓存看会不会界面不显示

lindexi avatar Sep 28 '19 06:09 lindexi

在我电脑上,是.net 4.0 win7下出现这种情况,我发现是windowchrome的原因,我把demo项目主窗体的windowchrome注释掉,这种情况就不出现了。但不知道如何解决。

seedtyx avatar Dec 06 '19 06:12 seedtyx

@seedtyx 请尝试开启 Aero 特效

lindexi avatar Dec 06 '19 14:12 lindexi

@seedtyx 请尝试开启 Aero 特效

你好,之前的情况就是开启Aero特效时有的,我的环境下,在WindowChrome里设置GlassFrameThickness为0时,该问题不出现。放弃显示的效果,相对于黑屏来说,可以接受。 这个与handycontrol无关,猜测可能是WindowChrome在某些老旧机器上的渲染有问题

seedtyx avatar Dec 09 '19 07:12 seedtyx

我已经尝试了设置GlassFrameThickness=0 问题依然存在,我所有的界面使用了统一的样式,有些界面从来没出现过 有些界面复现频率很高,而且与界面元素复杂度没有什么关系。尝试过在load后改变界面大小,问题却依然存在

fupengfei1223 avatar Dec 29 '19 03:12 fupengfei1223

OK, 问题似乎已经解决,我采用的方案是Load事件里面通过延时设置窗体大小。 Task.Delay(200).ContinueWith((p) => { Dispatcher.Invoke(delegate { this.Width = this.Width - 10; }); }); Task.Delay(500).ContinueWith((p) => { Dispatcher.Invoke(delegate { this.Width = this.Width +10; }); });

fupengfei1223 avatar Dec 29 '19 04:12 fupengfei1223

这个问题怎么解决啊

Gate7HW avatar May 31 '22 04:05 Gate7HW