Animation's FillBehavior property set to "Stop" seems has no effect.
Posted: 25 Jul 2017, 07:18
Hi there,
When setting Animation's FillBehavior to "Stop", is seem to have no effect. Which means when animation ended, it's still overriding the target property with animation value, but the expected result should be the target property value rollback to original.
Below is my code sample:
When setting Animation's FillBehavior to "Stop", is seem to have no effect. Which means when animation ended, it's still overriding the target property with animation value, but the expected result should be the target property value rollback to original.
Below is my code sample:
Code: Select all
var storyboard = new Storyboard();
var duration = new Duration(TimeSpan.Parse("0:0:1"));
var tAnimation = new StringAnimationUsingKeyFrames() {
Duration = duration,
FillBehavior = FillBehavior.Stop
};
tAnimation.KeyFrames.Add(new DiscreteStringKeyFrame() {
Value = "hello world",
KeyTime = KeyTime.FromPercent(0.5f)
});
Storyboard.SetTarget(tAnimation, heroCard);
Storyboard.SetTargetProperty(tAnimation, new PropertyPath(HeroControl.MessageProperty));
storyboard.Children.Add(tAnimation);