WPF 应用程序在移动时缓慢/不稳定
我正在创建一个相当基本的 WPF 应用程序外壳。当我使用 DragMove()
函数移动它时,应用程序可以正常移动,但似乎“猛烈”了很多。在我看来,重绘率非常低,使得应用程序看起来缓慢且无响应。
目前,除了调用 DragMove()
之外,没有任何“代码”。
XAML 由带圆角的外边框和设置为 RenderingBias="Performance" 的阴影组成。标题栏和路径上还有一个小渐变。但即使在代码中注释掉这些,仍然会使应用程序在移动时显得不稳定和缓慢。
注意我也在发布版和调试器之外运行了它。
I have a rather basic shell of a WPF app that I am creating. When I move it using the DragMove()
function the app moves properly but seems to "jerk" a lot. It seems to me that the redraw rate is very low making the application look slow and unresponsive.
Currently there is no "code" besides a call to DragMove()
.
The XAML consists of an outer border with rounded corners and drop shadow set to RenderingBias="Performance"
. There is also a small gradient on the title bar and a path. But even commenting these out of the code still makes the app appear jerky and slow whilst moving.
Note I have ran this in Release and outside the debugger too.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据经验,尝试删除投影,您会看到更好的性能。
http://social. msdn.microsoft.com/Forums/en-US/wpf/thread/99faecec-395f-4a47-92ee-620b11c39ae7
From experience, try removing the drop shadow and you'll see much better perfomance.
http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/99faecec-395f-4a47-92ee-620b11c39ae7