Cancel any animations that are running on the specified dependency property. - CSharp Windows.UI.Xaml.Media.Animation

CSharp examples for Windows.UI.Xaml.Media.Animation:Animation

Description

Cancel any animations that are running on the specified dependency property.

Demo Code

// http://www.codeproject.com/info/cpol10.aspx
using System.Windows.Media.Animation;
using System.Windows;
using System;//from  w w w  . j av  a2  s.  c  om

public class Main{
        /// <summary>
        /// Cancel any animations that are running on the specified dependency property.
        /// </summary>
        public static void CancelAnimation(UIElement animatableElement, DependencyProperty dependencyProperty)
        {
            animatableElement.BeginAnimation(dependencyProperty, null);
        }
}

Related Tutorials