<Window.Resources>
<Storyboard x:Key="AnimateTarget">
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform"
Storyboard.TargetProperty="ScaleX">
<EasingDoubleKeyFrame KeyTime="0:0:0"
Value="0.0" />
<EasingDoubleKeyFrame KeyTime="0:0:3"
Value="2.0">
<EasingDoubleKeyFrame.EasingFunction>
<ElasticEase EasingMode="EaseOut"
Oscillations="13"
Springiness="8" />
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames Storyboard.TargetName="Transform"
Storyboard.TargetProperty="ScaleY">
<EasingDoubleKeyFrame KeyTime="0:0:0"
Value="0.0" />
<EasingDoubleKeyFrame KeyTime="0:0:0"
Value="2.0">
<EasingDoubleKeyFrame.EasingFunction>
<ElasticEase EasingMode="EaseOut"
Oscillations="13"
Springiness="8" />
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Window.Resources>
谢谢:)
答案 0 :(得分:3)
看看:
http://msdn.microsoft.com/en-us/library/ms605709.aspx
将来如果你想要答案,试着至少尝试手头的任务......当你遇到困难时,发布你卡住的地方,展示你做过/尝试过的事情。
答案 1 :(得分:0)
试试这个快速入门:
当您的XAML打开像
这样的XML元素时<ABC SomeAttrib=SomeValue >
<Child ChildProp=ChildVal />
</ABC>
你可以通过
在代码中做类似的事情var abc = new ABC()
abc.SomeAttrib=SomeValue;
abc.Content = new Child {ChildProp=ChildVal};
注意:元素<EasingDoubleKeyFrame.EasingFunction>
实际上是一个属性,即“EasingDoubleKeyFrame”类型的某个实例的属性“EasingFunction”,不会被此愚弄。