internal ImageAnimationController(Image image, ObjectAnimationUsingKeyFrames animation, bool autoStart)
        {
            Image                = image;
            Animation            = animation;
            Animation.Completed += AnimationCompleted;
            Clock                = Animation.CreateClock();
            ClockController      = Clock.Controller;
            SourceDescriptor.AddValueChanged(image, ImageSourceChanged);

            // ReSharper disable once PossibleNullReferenceException
            ClockController.Pause();

            Image.ApplyAnimationClock(Image.SourceProperty, Clock);

            if (autoStart)
            {
                ClockController.Resume();
            }
        }