Quantcast
Channel: WPF - 3000 rectangles - render speed
Viewing all articles
Browse latest Browse all 6

WPF - 3000 rectangles - render speed

$
0
0
If you are using a canvas, I'm assuming that you are using Canvas.X and Canvas.Y to position your rectangles.
The problem is that everytime you're modifying one of these properties the whole layouting is triggered.
A less expensive version would be to use a TranslateTransform as RenderTransform and just modifying the properties there. The benefit would be that if you move one of these rectangles it is moved with blitting which is a very cheap operation.

Viewing all articles
Browse latest Browse all 6

Trending Articles