Adam Kinney on Silverlight and Expression Blend

focusing on building interactive apps with Silverlight

CompositeTransform simplifies transforms in Silverlight 4 Beta

with 4 comments

One of the features you may have missed that was added to the Silverlight 4 beta is the new CompositeTransform class. The new class provides a simpler way to transform an element, by simply offering a single object to instantiate rather than a group of transforms made for specific transforms. To animate properties, you will no longer need to name multiple Transforms or access them by index (hoping they were added in the expected order).

Not only is the code easier to write and less characters, but property access is clearer.  To rotate an object you change the Rotation property rather than the RotationTransform.Angle property. I think the simplicity of property access is demonstrated best by the C# example below.

XAML example

C# example

You will notice that the new Expression Blend for .NET 4 Preview still defaults to the verbose TransformGroup, but it will render the CompositeTransform without complaints.

For more information on the Silverlight 4 Beta, check out the Technical Feature Overview for Silverlight 4.

Written by Adam Kinney

November 22, 2009 at 9:53 pm

Posted in Client Technologies

Tagged with

4 Responses

Subscribe to comments with RSS.

  1. [...] CompositeTransform simplifies transforms in Silverlight 4 Beta (Adam Kinney) [...]

  2. Social comments and analytics for this post…

    This post was mentioned on Twitter by adkinn: CompositeTransform simplifies transforms in Silverlight 4 Beta http://ff.im/-bRZ7f...

    uberVU - social comments

    November 23, 2009 at 6:12 am

  3. [...] мотивам CompositeTransform simplifies transforms in Silverlight 4 Beta [en] Tags: Комментарии (0) Уведомления (0) Написать [...]

  4. Yeah this is great feature. Glad you pointed it out for every one. Definitely makes a lot of scenarios easier and less error prone.

    Grant Hinkson

    December 4, 2009 at 3:40 pm


Leave a Reply