In this article we will see Projection in
Silverlight, which describe how to transform an object in 3-D space using
perspective transforms. In this article we will use Plane Projection, which
represents a perspective transform (a 3-D-like effect) on an
object.Creating Silverlight Project
Fire up Visual Studio
2008 and create a Silverlight Application. Name it as
the solution in Expression Blend 3 to design the application.
aim of the sample is to rotate an image in 3 directions that is X, Y and Z
plane. So we need three TextBlocks and three Slider Controls and an Image
The design will look something similar to the
you look into the Objects and Timeline Pane you will find the following controls
go back to Visual Studio 2008 environment.
Here is the Xaml code for your
Now the Border Control which contains the
Image; we need to add Projection and then Plane Projection. The xaml will look
Now we will bind the Projection with the
respective Slider Controls.
As we have added a Button to reset the
Rotations. Add the following code to reset the rotation:
Now our application
is ready to go. Press F5 to run the application.
it you have successfully used the Plane Projection in Silverlight.
You can also download sample project used in the above example.