码迷,mamicode.com
首页 > Windows程序 > 详细

WPF窗体闪烁的一种解决办法

时间:2020-05-01 01:06:52      阅读:200      评论:0      收藏:0      [点我收藏+]

标签:解决   eve   font   with   class   perl   ack   ref   tran   

参考:Prevent WPF window flicker

You can use a transparent window (AllowTransparency = True) with a grid, then when your control needs to be hidden you can set the visibility of the control to collapsed. There will be no flickering and no moving of the window but there won‘t be anything there either so you will see throug as if you would have resized, moved your window.

某些时候,弹出的窗体会闪烁,这着实让人难受,通过给给要弹出的窗体设置AllowTransparency为True,对闪烁问题有一定的缓解。

WPF窗体闪烁的一种解决办法

标签:解决   eve   font   with   class   perl   ack   ref   tran   

原文地址:https://www.cnblogs.com/144823836yj/p/12812092.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!