WPF uses a different model for graphical manipulations than WinForms.
With WinForms, you can directly edit the pixels on the screen. The concept of your rectangle is lost after drawing pixels. Drawing pixels is a very fast operation.
With WPF, you do not control the pixels on the screen. DirectDraw is this. DirectDraw is a vector layout engine. You do not draw pixels. You define vector shapes (or visual effects). The concept of a RETAINED shape or rectangle, even after the image is displayed on the screen. When you add a new rectangle that overlaps the others, ALL OTHER RECTANGLES ARE NECESSARY TO BE AN IMAGE. This probably slows down. This does not happen when using WinForms.
You can improve WPF performance a bit by overriding OnRender. You can cut the overhead of a Rectangle object and directly provide visual effects. However, you still do not draw pixels on the screen. You define the forms that DirectDraw uses to render the image. In this regard, the name OnRender may be a little misleading.
I am sure that you can find many tricks to improve the performance of your application in WPF. There are still ways to draw pixels - but this is a kind of victory over the WPF point.
What are thousands of rectangles for?
Scott source share