【问题标题】:Why OffsetX of TranslateTransform3D can't be modified after DoubleAnimation?为什么DoubleAnimation后不能修改TranslateTransform3D的OffsetX?
【发布时间】:2009-07-30 18:18:38
【问题描述】:

我的代码在这里,运行后我无法再编辑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);

【问题讨论】:

    标签: wpf transform


    【解决方案1】:

    TranslateTransform3D 派生自 Freezable。您的翻译在动画后被冻结,这使其不可变。

    【讨论】:

      猜你喜欢
      • 2019-07-26
      • 1970-01-01
      • 1970-01-01
      • 2018-12-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-04
      • 1970-01-01
      相关资源
      最近更新 更多