Online Since 1995. Yep, that long.

Star Wars Scroller in Silverlight 3

Silverlight 3's Plane Projection feature inspired to create a Star Wars Crawler (See it in action)

silverlight 3 plane projection by you.


The text block resides in a Grid and the Grid has the following element

            <PlaneProjection x:Name="Projection"
                CenterOfRotationZ="0.5" RotationZ="0" RotationY="-1.393" RotationX="-45" />


This is what makes the text appear to be on a plane rotated 45 degrees away from the camera.

Cool, but what about animating this?

That's easy:

<Storyboard x:Name="Intro">
    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="txtScroll" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
        <EasingDoubleKeyFrame KeyTime="00:00:00" Value="499.127"/>
        <EasingDoubleKeyFrame KeyTime="00:00:00.4000000" Value="499.12701416015625"/>
        <SplineDoubleKeyFrame KeyTime="00:00:44.4000000" Value="-777.966"/>

In plain English, what I'm doing it changing the Y placement of the TextBlock on the Grid.

Since the plane projection is applied to the Grid, the "3D effect" of the plane projection will automatically be applied.

The only code to make this work is the code to start the Storyboard:

Storyboard sb = this.Resources["Intro"] as Storyboard;


Now, all I need to do is add music. :)


Add a Comment