Introduction
A new feature in Silverlight 3 is the Perspective Transforms. With its help you can simulate rotating an object in 3D space. Note that this is not a real 3D, Silverlight does not support 3D yet.
Overview
Let's start with a little demo:
And let's describe the things step by step. You have an
UIElement, in our situation an image. The X axis of the element is from left to right, the Y axis is going up and down and the Z axis is going in and out of the surface of the image.
If we want to rotate the image on the X axis we are just setting the
RotationX of the
UIElement.Projection as follows:
<Image x:Name="imgTarantula" Width="400" |
HorizontalAlignment="Center" VerticalAlignment="Center" |
Source="http://terraristic.net/photos/Acanthoscurria_geniculata/Acanthoscurria_geniculata_1.jpg"> |
<Image.Projection> |
<PlaneProjection RotationX="45"></PlaneProjection> |
</Image.Projection> |
</Image> |
And we have the following result: