win8第四步变换和投射
RotateTransform旋转变化 Angle=“95”旋转95度 CenterX="50" CenterY="50"以那为中心旋转
ScaleTransform缩放变化 ScaleX="3" ScaleY="1"向X缩放多少向Y缩放多少 值可以为负数如果是负数就倒过来了
TranslateTransform平移变化 X="10" Y="200"平移多少 以后要用这个不要用location了
PlaneProjection投射 RotationY RotationX图为RotationX="50"
让它不停旋转
<Grid Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"> <Button Content="Button" HorizontalAlignment="Left" Margin="280,144,0,0" VerticalAlignment="Top" Height="120" Width="323"> <Button.RenderTransform> <!--<RotateTransform Angle="95" CenterX="50" CenterY="50"></RotateTransform>--><!-- 旋转变化--> <ScaleTransform ScaleX="-1"></ScaleTransform> <!--缩放变化--> <!--<TranslateTransform X="10" Y="200"></TranslateTransform>--><!--平移变化--> </Button.RenderTransform> </Button> <Image HorizontalAlignment="Left" Height="100" Margin="375,513,0,0" VerticalAlignment="Top" Width="100" Source="Image/1.png"> <Image.Projection> <!--<Matrix3DProjection ProjectionMatrix="20"></Matrix3DProjection>--> <PlaneProjection x:Name="pp1" RotationY="50"> </PlaneProjection> </Image.Projection> </Image> </Grid>
protected override void OnNavigatedTo(NavigationEventArgs e) { DispatcherTimer time = new DispatcherTimer(); time.Interval = TimeSpan.FromMilliseconds(200); time.Tick+=time_Tick; time.Start(); } private void time_Tick(object sender, object e) { pp1.RotationX += 5; }