Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I make resizing WPF windows less "laggy"?

I am relatively new in the WPF world and one thing I immediately noticed is how laggy the window content is drawn when you resize a window. For example if you have scrollbars at the window edges those scrollbars will be partly hidden while shrinking and have space between them and the window border when enlarging.

This even happens with an empty WPF project created in Visual Studio. What's even worse is that it also happens with the background and you can see stuff behind the window (other windows, desktop wallpaper, etc.) leak through when enlarging.

At first I thought that it's an ugly limitation of WPF seeing that native or WinForms applications resize just fine (if written properly). But when I look at Expression Blend the window background stays opaque (though the window content still lags behind). What do they do to prevent described problem and are there any ways to improve resizing to more approximate native/WinForm GUIs?

like image 319
gix Avatar asked Feb 17 '09 02:02

gix


2 Answers

The reason of lags is nicely explained here

like image 138
Tomáš Kafka Avatar answered Oct 07 '22 10:10

Tomáš Kafka


Are you running Vista without SP1 ? From what I have read, this was a common issue that is supposed have been fixed..

http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/3960d6a6-e873-455c-9ddc-1e2dd32e090b/

like image 36
markt Avatar answered Oct 07 '22 08:10

markt