Exemple #1
0
        /// <summary>
        /// Start a specific animation
        /// </summary>
        /// <param name="animationType"></param>
        public void StartAnimation(ClippyAnimations animationType, bool byPassCurrentAnimation = false)
        {
            System.Windows.Application.Current.MainWindow.Dispatcher.Invoke(new Action(() =>
            {
                if (!IsAnimating || byPassCurrentAnimation)
                {
                    IsAnimating = true;

                    clippedImage.BeginAnimation(Canvas.LeftProperty, Animations[animationType.ToString()].Item1);
                    clippedImage.BeginAnimation(Canvas.TopProperty, Animations[animationType.ToString()].Item2);
                }
            }), DispatcherPriority.Send);
        }
Exemple #2
0
 /// <summary>
 /// Start a specific animation
 /// </summary>
 /// <param name="animationType"></param>
 public void StartAnimation(ClippyAnimations animationType, bool byPassCurrentAnimation = false)
 {
     clippedImage.BeginAnimation(Canvas.LeftProperty, Animations[animationType.ToString()].Item1);
     clippedImage.BeginAnimation(Canvas.TopProperty, Animations[animationType.ToString()].Item2);
 }