PlaneProjection 类 表示对象的透视转换(类似三维效果)[silverlight]

PlaneProjection 类 表示对象的透视转换,
您可以将透视转换应用于 UIElement,包括控件。例如,您可以将该效果应用于 Grid,而后者又包含 TextBox 和 Button
Demo: 

<StackPanel Margin="35" Background="Gray">
<StackPanel.Projection>
<PlaneProjection RotationX="-35" RotationY="-35" RotationZ="15"/>
</StackPanel.Projection>
<TextBlock Margin="10">Type Something Below</TextBlock>
<TextBox Margin="10"></TextBox>
<Button Margin="10" Content="Click" Width="100" />
</StackPanel>

效果: http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/index.htm#/?sref=BasicPerspectiveTransforms

PlaneProjection 具有以下 12 个可用于控制对象的旋转和位置的属性:

名称说明
CenterOfRotationX 获取或设置所旋转对象的旋转中心 X 坐标。
CenterOfRotationY 获取或设置所旋转对象的旋转中心 Y 坐标。
CenterOfRotationZ 获取或设置所旋转对象的旋转中心 Z 坐标。
Dispatcher 获取与此对象关联的 Dispatcher。 (继承自 DependencyObject。)
GlobalOffsetX 获取或设置沿屏幕的 X 轴平移对象的距离。
GlobalOffsetY 获取或设置沿屏幕的 Y 轴平移对象的距离。
GlobalOffsetZ 获取或设置沿屏幕的 Z 轴平移对象的距离。
LocalOffsetX 获取或设置沿对象平面的 X 轴平移对象的距离。
LocalOffsetY 获取或设置沿对象平面的 Y 轴平移对象的距离。
LocalOffsetZ 获取或设置沿对象平面的 Z 轴平移对象的距离。
ProjectionMatrix 获取 PlaneProjection 的投影矩阵。
RotationX 获取或设置围绕旋转的 X 轴旋转对象的角度。
RotationY 获取或设置围绕旋转的 Y 轴旋转对象的角度。
RotationZ 获取或设置围绕旋转的 Z 轴旋转对象的角度。

 

 

 

 

 

 

 

 

 

 

 

 







使用PlaneProjection 还可以实现更炫的移动三维效果:
http://samples.msdn.microsoft.com/Silverlight/SampleBrowser/index.htm#/?sref=AnimatedPerspective 

posted @ 2012-03-11 18:59  把爱延续  阅读(375)  评论(0编辑  收藏  举报