I have a problem with my Silverlight animation that I cannot fix. The problem seems to be well established, but the methods used to solve it do not seem to work in my case.
Here is the storyboard code that I use to animate the mesh called "underGrid". underGrid is the base grid in which I apply scale and location offset in response to user input from the user so that they can scale and move the grid in real time. The ResetGrid script below simply animates the current scale and location values to scale {1, 1} and location {0, 0}, resetting the user view. I would like to be able to apply this animation whenever the user presses the reset button, but it freezes the scale and translation transformations after it starts once (as described here: http://msdn.microsoft.com/en-us/library/ aa970493.aspx) This means that when the user uses the mouse to move the grid, it does not move. I tried everything I could, so that the animation does not affect the properties of dependencies. I tried to hook up the Completed event and try (among other things), stop the animation, find the animation to 0, scroll through the ResetGrid Children and use StoryBoard.SetTarget (). I also tried installing FillBehavior. No matter what I do, nothing has changed; Scale and Translation are always tapped and cannot be reinstalled in user code.
Can someone suggest something that I can try that I have not listed above (strongly or otherwise :))? All I want is an animation that completely stops and breaks away from Complete.
XAML Storyboard:
<Storyboard x:Name="ResetGrid">
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="underGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="underGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="0">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="underGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="underGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)">
<EasingDoubleKeyFrame KeyTime="00:00:00.5000000" Value="1">
<EasingDoubleKeyFrame.EasingFunction>
<CubicEase EasingMode="EaseInOut"/>
</EasingDoubleKeyFrame.EasingFunction>
</EasingDoubleKeyFrame>
</DoubleAnimationUsingKeyFrames>
</Storyboard>