2009-07-30 4 views
0

Mon code est ici, et je ne peux pas modifier toute la propriété offset TranslateTransform3D plus après l'exécution de celle-ci:Pourquoi OffsetX de TranslateTransform3D ne peut pas être modifié après DoubleAnimation?

   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); 

Répondre

1

TranslateTransform3D dérive de Freezable. Votre traduction est gelée après l'animation, ce qui la rend immuable.