首页 新闻 会员 周边 捐助

关于WPF附加属性

0
悬赏园豆:50 [已关闭问题] 关闭于 2011-05-05 13:47
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);
//这一行报错...求高手指点一下

这个是后台写的..
问题补充: da.SetValue(Storyboard.TargetPropertyProperty,Canvas.LeftProperty);//这一行报错...求高手指点一下
郭凯的主页 郭凯 | 初学一级 | 园豆:125
提问于:2011-05-05 12:59
< >
分享
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册