Storyboard sb = new Storyboard(); // add animations to sb sb.Remove(animationObj1);
Timeline animation = new DoubleAnimation(0, 1, new Duration(TimeSpan.FromSeconds(1))); Storyboard.SetTarget(animation, myElement); Storyboard.SetTargetProperty(animation, new PropertyPath(MyElement.OpacityProperty)); Storyboard sb = new Storyboard(); sb.Children.Add(animation); sb.Remove(animation); // remove the animationIn this example, we create a DoubleAnimation object and add it to a Storyboard. Then, we remove the animation using the Remove method. This method is part of the System.Windows.dll package library.