My application involves moving many rectangles around the screen using the mouse. There is one main rectangle which contains ~ 24 smaller rectangles.
The mouse move event does the following:
mouseLocation = e.GetPosition((UIElement)sender);
The locations of the rectangles are updated:
rect.Location = DetermineLocation(); // Rect object
perimeter.Rect = rect; // RectangleGeometry
I am adding all of the rectangle geometries (~ 25) to a path geometry and setting a path object's data property to said path geometry object.
When i move the entire group of rectangles around the screen, my CPU usage goes to over 70% (i have an Intel Atom N450 @ 1.67 Ghz). I am convinced that there is a much "lighter weight" way to do this in WPF. Someone please enlighten me.
View Complete Post