Silverlight 3中加入许多新的特性,其中最令人激动的新特性之一就是Plane Projection,利用它可以使任何UIElement元素在3D空间中旋转,实现简单的3D旋转效果。
Silverlight 3中加入许多新的特性,其中最令人激动的新特性之一就是Plane Projection,利用它可以使任何UIElement元素在3D空间中旋转,实现简单的3D旋转效果。
下面是简单的实现一个图片在3D空间中沿着Y轴旋转的效果,当然只需要简单修改一下即可实现沿着X轴和Z轴旋转的效果。
<UserControl x:Class="PlaneProjDemo.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="480" Height="360">
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel>
<Image Margin="15,5,15,5" x:Name="imageFlip" Width="470" Height="350">
<Image.Projection>
<PlaneProjection x:Name="Rotator" />
</Image.Projection>
</Image>
</StackPanel>
</Grid>
</UserControl>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="480" Height="360">
<Grid x:Name="LayoutRoot" Background="White">
<StackPanel>
<Image Margin="15,5,15,5" x:Name="imageFlip" Width="470" Height="350">
<Image.Projection>
<PlaneProjection x:Name="Rotator" />
</Image.Projection>
</Image>
</StackPanel>
</Grid>
</UserControl>















































