I want to implement an effect like this:
there is a 80*80 scrollview,and i put a 160*80 pic in it
1s:the pic left/up in the scrollview,2s:the pic right/up in the scrollview
rolling as a transition process
my code:
xaml
<UserControl.Resources>
<Storyboard x:Name="Storyboard1">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateY)" Storyboard.TargetName="my_combo_pic">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="80"/>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(CompositeTransform.TranslateX)" Storyboard.TargetName="my_combo_pic">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:3" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</UserControl.Resources>
...
<ScrollViewer x:Name="my_combo" Tap="MyCombolIconTapped" HorizontalAlignment="Right" Height="80" Margin="0" VerticalAlignment="Bottom" Width="80">
<Image x:Name="my_combo_pic" Stretch="Fill" Source="/Images/my_combo_icon.png" RenderTransformOrigin="0.5,0.5" Height="160" Width="80">
<Image.RenderTransform>
<CompositeTransform/>
</Image.RenderTransform>
</Image>
</ScrollViewer>
</Grid>
cs
Storyboard1.Begin();
in the Loaded
But,i find that the animation don't work even it works well in the expression blend
So,can u help me find out what reason it is???
Or give me another way to implement this
thank U!!!
Any Advice will be great