2 u013567163 u013567163 于 2014.04.18 15:01 提问

DoubleAnimation不包含采用“3”个参数的构造函数
         Storyboard storyboard = new Storyboard();

        DoubleAnimation doubleAnimation = new DoubleAnimation(Canvas.GetLeft(rect), p.X, new Duration(TimeSpan.FromMilliseconds(500)));
        Storyboard.SetTarget(doubleAnimation, rect);

        Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath("(Canvas.Left)"));

        storyboard.Children.Add(doubleAnimation);

        //创建Y轴方向动画

        doubleAnimation = new DoubleAnimation(

          Canvas.GetTop(rect),

          p.Y,

          new Duration(TimeSpan.FromMilliseconds(500))

        );

        Storyboard.SetTarget(doubleAnimation, rect);

        Storyboard.SetTargetProperty(doubleAnimation, new PropertyPath("(Canvas.Top)"));

        storyboard.Children.Add(doubleAnimation);
        storyboard.Begin();

为什么报错“System.Windows.Media.Animation.DoubleAnimation”不包含采用“3”个参数的构造函数

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!