DoubleAnimation da = new DoubleAnimation();
IEasingFunction ief = da.EasingFunction;
da.SetValue(BounceEase.BouncesProperty, 2);
da.SetValue(BounceEase.EasingModeProperty, EasingMode.EaseIn);
da.SetValue(BounceEase.BouncinessProperty, new BounceEase().Bounciness=1);
//ief.Ease(12.00);//这个缓动函数也不知道怎么用啊...
da.From = 0;前台的完全能运行的..代码如下<Window.Resources> <Storyboard Name="MyStoryboard" x:Key="MyStoryboard"> <DoubleAnimation From="0" To="300" Duration="00:00:4" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(Canvas.Right)"> <DoubleAnimation.EasingFunction> <BounceEase Bounciness="1" Bounces="1" EasingMode="EaseIn"></BounceEase> </DoubleAnimation.EasingFunction> </DoubleAnimation> </Storyboard> </Window.Resources>
小弟号是新号...请大侠们不吝赐教.....感激不尽..谢谢
da.To = 300;
da.SetValue(Storyboard.TargetNameProperty, "ellipse1");
da.SetValue(Storyboard.TargetPropertyProperty,Canvas.LeftProperty);//这一行报错...求高手指点一下
这个是后台写的..