0

Is there any way to prevent visual artifacts when a control moves? (Like when animating it)

I'm animating window's height property and i have a button on bottom of that window. While window moves button's shape looks bad(like its crushed).

You can test this in any Windows application by resizing it's window fast.

In some applications i can't see this behaviour. I want to know how?

c36ab7c4
  • 75
  • 4
  • WPF had some flaws but now the feature improvements are much better then they were for utilization of DirectX and Visual rendering. Take a look at [these](http://www.cshandler.com/2015/08/improvements-in-wpf-in-vs-2015-and-net.html) feature improvements in newer version. – vendettamit Sep 11 '15 at 01:11

1 Answers1

0

This is just how WPF renders. When you resize your window, what you're seeing is the DirectX surface resizing and the entire surface redrawing, which takes a considerable amount of time. If you have a problem with the speed of WPF's rendering, you may have to look into other UI technologies.

You can however change the color of the window background. When resizing fast, this will remove the black color behind your window before it caches up. Read here: How to fix the WPF form resize - controls lagging behind and black background?

Community
  • 1
  • 1
caesay
  • 16,932
  • 15
  • 95
  • 160