Your project manager wants you to animate the perspective transform applied to the video while it is being reproduced.
We are going to add a StoryBoard
in XAML code to animate the PlaneProjection
instance:
1. Stay in the project,
3DInvadersSilverlight
.2. Open
MainPage.xaml
and replace thePlaneProjection
definition with the following line (we have to add a name to refer to it):<PlaneProjection x:Name ="proIntroduction" RotationX="-40" RotationY="15" RotationZ="-6" LocalOffsetX="-70" LocalOffsetY="-105" />
3. Add the following lines of code before the end of the definition of the
cnvVideo Canvas
:<Canvas.Resources> <Storyboard x:Name="introductionSB"> <DoubleAnimation Storyboard.TargetName="proIntroduction" Storyboard.TargetProperty="RotationX" From="-40" To="0" Duration="0:0:5" AutoReverse="False" RepeatBehavior="1x" /> </Storyboard> </Canvas.Resources>
4. Now, add the following line of code before the end of the
PlayIntroductoryVideo...