This project is read-only.
1
Vote

ScaleTransformAnimation fails on subsequent calls

description

When scalling the same object more than once only the X direction works. This is because on subsequent calls the code reuses the existing storyboard and does not set the Y direction animation key frames to the new scale. I added these three lines at the end of the ApplyValues method:
 
animation = storyboard.Children[1] as DoubleAnimationUsingKeyFrames;
animation.KeyFrames[0].Value = Scale;
animation.KeyFrames[0].KeyTime = KeyTime.FromTimeSpan(AnimationDuration);

comments