Browse Source

Port RenderTest animations to the new syntax

pull/1461/head
Jumar Macato 9 years ago
parent
commit
fb24332d2a
  1. 71
      samples/RenderTest/Pages/AnimationsPage.xaml
  2. 13
      samples/RenderTest/Pages/ClippingPage.xaml

71
samples/RenderTest/Pages/AnimationsPage.xaml

@ -40,27 +40,68 @@
<Setter Property="Height" Value="100"/> <Setter Property="Height" Value="100"/>
<Setter Property="Child" Value="{StaticResource Acorn}"/> <Setter Property="Child" Value="{StaticResource Acorn}"/>
</Style> </Style>
<Style Selector="Border.Rect1"> <Style Selector="Border.Rect1:pointerover">
<Style.Animations> <Style.Animations>
<Animation Duration="0:0:2.5" <Animation Duration="0:0:2.5"
RepeatBehavior="Repeat" RepeatBehavior="Repeat"
RepeatCount="4" FillMode="None" RepeatCount="4"
PlaybackDirection="AlternateReverse" FillMode="None"
PlaybackDirection="AlternateReverse"
Easing="SineEaseInOut"> Easing="SineEaseInOut">
<KeyFrame Cue="0%"> <KeyFrame Cue="20%">
<DoubleSetter Property="Opacity" Value="0"/> <TransformSetter Property="RotateTransform.Angle" Value="45"/>
</KeyFrame> </KeyFrame>
<KeyFrame Cue="0%"> <KeyFrame Cue="50%">
<TransformSetter Property="RotateTransform.Angle" Value="360"/> <TransformSetter Property="ScaleTransform.ScaleX" Value="1.5"/>
<TransformSetter Property="ScaleTransform.ScaleX" Value="2"/> </KeyFrame>
<TransformSetter Property="ScaleTransform.ScaleY" Value="2"/> <KeyFrame Cue="80%">
</KeyFrame> <TransformSetter Property="RotateTransform.Angle" Value="120"/>
<KeyFrame Cue="100%"> </KeyFrame>
<DoubleSetter Property="Opacity" Value="1"/>
</KeyFrame>
</Animation> </Animation>
</Style.Animations> </Style.Animations>
</Style> </Style>
<Style Selector="Border.Rect2:pointerover">
<Style.Animations>
<Animation Duration="0:0:0.5" Easing="SineEaseInOut">
<KeyFrame Cue="50%">
<TransformSetter Property="ScaleTransform.ScaleX" Value="0.8"/>
<TransformSetter Property="ScaleTransform.ScaleY" Value="0.8"/>
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<Style Selector="Border.Rect3">
<Setter Property="Child" Value="{StaticResource Heart}"/>
<Style.Animations>
<Animation Duration="0:0:0.5" Easing="QuadraticEaseInOut" RepeatBehavior="Loop">
<KeyFrame Cue="50%">
<TransformSetter Property="ScaleTransform.ScaleX" Value="0.8"/>
<TransformSetter Property="ScaleTransform.ScaleY" Value="0.8"/>
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<Style Selector="Border.Rect4:pointerover">
<Style.Animations>
<Animation Duration="0:0:3" Easing="BounceEaseInOut">
<KeyFrame Cue="48%">
<TransformSetter Property="TranslateTransform.Y" Value="-100"/>
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
<Style Selector="Border.Rect5:pointerover">
<Style.Animations>
<Animation Duration="0:0:3" Easing="CircularEaseInOut">
<KeyFrame Cue="25%">
<TransformSetter Property="SkewTransform.AngleX" Value="-20"/>
</KeyFrame>
<KeyFrame Cue="75%">
<TransformSetter Property="SkewTransform.AngleX" Value="20"/>
</KeyFrame>
</Animation>
</Style.Animations>
</Style>
</Styles> </Styles>
</UserControl.Styles> </UserControl.Styles>
<Grid> <Grid>

13
samples/RenderTest/Pages/ClippingPage.xaml

@ -4,17 +4,16 @@
<Grid.Styles> <Grid.Styles>
<Styles> <Styles>
<Style Selector="Border#clipped :pointerover"> <Style Selector="Border#clipped :pointerover">
<Setter Property="Border.Background" Value="Crimson"/> <Setter Property="Border.Background" Value="Crimson"/>
</Style> </Style>
<Style Selector="Border#clipChild"> <Style Selector="Border#clipChild">
<!-- <Style.Animations> <Style.Animations>
<Animation Duration="0:0:2" RepeatBehavior="Loop"> <Animation Duration="0:0:2" RepeatBehavior="Loop">
<TransformKeyFrames Property="RotateTransform.Angle"> <KeyFrame Cue="100%">
<KeyFrame Cue="0%" Value="0"/> <TransformSetter Property="RotateTransform.Angle" Value="360"/>
<KeyFrame Cue="100%" Value="360"/> </KeyFrame>
</TransformKeyFrames>
</Animation> </Animation>
</Style.Animations> --> </Style.Animations>
</Style> </Style>
</Styles> </Styles>
</Grid.Styles> </Grid.Styles>

Loading…
Cancel
Save