O'Reilly logo

Microsoft® Silverlight® Edition: Programming Windows® Phone 7 by Charles Petzold

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

A Cautionary Tale

In previous chapters I’ve showed you how to use CompositionTarget.Rendering for moving and changing visual objects in synchronization with the refresh rate of the video display. While certainly convenient for some scenarios, this feature of Silverlight should be used with discretion. If you’re really interested in using CompositionTarget.Rendering for a full-fledged game loop, for example, perhaps it’s time to start thinking about XNA.

The big problem is that sometimes CompositionTarget.Rendering does not work as well as you might anticipate. For example, you might remember the Spiral program from Chapter 13. Here is a program that attempts to use CompositionTarget.Rendering to rotate that spiral.

Example 15-8. Silverlight Project: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required