November 17th, 2009

Optimizing Silverlight with Enable Redraw Regions

All Silverlight Examples, Silverlight 3 tutorials, Working with Silverlight, by Gavin Wignall.

When building Silverlight applications, especially ones with multiple animations and storyboards, it is easy to quickly find your processor requirements start spiking. This can reduce your viewers experience through slow frame rates and jumpiness, especially on lower spec machines.

One way to optimize your Silverlight application is to check that it is not having to render objects that are not being used or seen. If a storyboard is animating an object then that object is redrawn each frame even if it is out of view or behind another object. By stopping these animations or collapsing them until we need them will help keep down the processor requirements.

By using the ‘EnableRedrawRegions‘ property we can see every part of the screen that is being redrawn each frame.

Below is an example of an animation and the ability to move an object on top to hide it.

Below is the same example but with the EnableRedrawRegions property switched on. Notice how the animation is still being redrawn even when it is fully hidden by the Black area, but if we press the Collapse button the animation is no longer redrawn.

The ‘how to’ bit

To turn on the EnableRedrawRegions property we need to add the following code in the HTML page hosting the Silverlight:

<param name=“enableRedrawRegions” value=“true” />

Add it after the ‘object‘ tag with the other default ‘param‘ tags created by Visual Studio.

Back Top

Responses to “Optimizing Silverlight with Enable Redraw Regions”

  1. No comments yet.
  1. Optimizing Silverlight with Enable Redraw Regions » Silverlight Buzz Silverlight Blog (,November 21, 2009)

    [...] is the original post:  Optimizing Silverlight with Enable Redraw Regions » Silverlight Buzz By admin | category: silverlight application | tags: frame-even, often-the-key, problem, [...]

Leave a Reply

Back Top