黑色边框,同时调整大小 [英] Black Border While Resizing

查看:128
本文介绍了黑色边框,同时调整大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始学习WPF的旅程。经过几天的编码,我发现无论何时调整任何WPF表单的大小时,我都会在底部和右侧获得黑色边框,同时调整大小,就像工件一样,就好像屏幕太慢一样。使用winforms时,我从来没有注意到这一点。



像这样: $ b



这是一个已知问题吗?任何简单的解决方法?

编辑1:



似乎与图形驱动程序有关,我只能在笔记本电脑上工作与弱gfx卡,其他人也有这个问题? (Im也使用Win7 SP1)

解决方案

如果调整窗口大小,必须重绘。这需要一些时间,并且它在之后发生窗口管理器已经调整了窗口的大小并显示它;在这种情况下,您将在WPF中获得黑色边框,并在Windows窗体中获得正常窗口背景(通常为灰色)。



通常情况下,您可以希望在那里是计算机足够快,重绘不显示它。


Im beginning in my journey of learning WPF. After a few days of coding I see that whenever I resize any WPF form I get a black border on the bottom and right while resizing, like an artifact, as if the screen is too slow. When working with winforms I never noticed this.

Like so :

Is this a known problem? any simple workaround?

EDIT 1:

Seems its related to the graphics driver, I only work on laptops with weakish gfx cards, so does anyone else have this issue? (Im also using Win7 SP1)

解决方案

If you resize a window it has to redraw. This takes some time and also it occurs after the window manager already resized your window and shows it; in that case you'll get a black border in WPF and one with the normal window background (grey, usually) in Windows Forms.

Usually all you can hope for there is that the computer is fast enough with the redraw to not show it.

这篇关于黑色边框,同时调整大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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