我的代码在这里,运行此代码后我无法再编辑TranslateTransform3D
的偏移属性:
DoubleAnimation doubleAnimationX =
new DoubleAnimation(x,
new Duration(TimeSpan.FromSeconds(second)));
DoubleAnimation doubleAnimationY =
new DoubleAnimation(y,
new Duration(TimeSpan.FromSeconds(second)));
DoubleAnimation doubleAnimationZ =
new DoubleAnimation(z,
new Duration(TimeSpan.FromSeconds(second)));
translate.BeginAnimation(TranslateTransform3D.OffsetXProperty, doubleAnimationX);
translate.BeginAnimation(TranslateTransform3D.OffsetYProperty, doubleAnimationY);
translate.BeginAnimation(TranslateTransform3D.OffsetZProperty, doubleAnimationZ);