public Task <object> GetAnimationTask(double milliseconds)
 {
     MoveCardDoubleAnimationX.Duration     = TimeSpan.FromMilliseconds(milliseconds);
     MoveCardDoubleAnimationY.Duration     = TimeSpan.FromMilliseconds(milliseconds);
     MoveCardDoubleAnimationAngle.Duration = TimeSpan.FromMilliseconds(milliseconds);
     return(MoveCardStoryboard.ToTask());
 }
 public void AnimateToReletiveAsync(Point to, double milliseconds = 0)
 {
     MoveCardDoubleAnimationX.To      += to.X;
     MoveCardDoubleAnimationY.To      += to.Y;
     MoveCardDoubleAnimationX.Duration = TimeSpan.FromMilliseconds(milliseconds);
     MoveCardDoubleAnimationY.Duration = TimeSpan.FromMilliseconds(milliseconds);
     MoveCardStoryboard.Begin();
 }
        public void AnimateToTaskList(Point to, bool rotate, double milliseconds, List <Task <object> > tasks)
        {
            MoveCardDoubleAnimationX.To = to.X;
            MoveCardDoubleAnimationY.To = to.Y;

            MoveCardDoubleAnimationX.Duration     = TimeSpan.FromMilliseconds(milliseconds);
            MoveCardDoubleAnimationY.Duration     = TimeSpan.FromMilliseconds(milliseconds);
            MoveCardDoubleAnimationAngle.Duration = TimeSpan.FromMilliseconds(milliseconds);

            if (rotate)
            {
                MoveCardDoubleAnimationAngle.To += 360;
            }

            tasks.Add(MoveCardStoryboard.ToTask());
        }
        public void AnimateToAsync(Point to, bool rotate, double milliseconds)
        {
            MoveCardDoubleAnimationX.To = to.X;
            MoveCardDoubleAnimationY.To = to.Y;

            MoveCardDoubleAnimationX.Duration     = TimeSpan.FromMilliseconds(milliseconds);
            MoveCardDoubleAnimationY.Duration     = TimeSpan.FromMilliseconds(milliseconds);
            MoveCardDoubleAnimationAngle.Duration = TimeSpan.FromMilliseconds(milliseconds);

            if (rotate)
            {
                MoveCardDoubleAnimationAngle.To += 360;
            }

            MoveCardStoryboard.Begin();
        }