private void CommitWithoutAnimation(AnimationWrapper animation)
 {
     foreach (AnimationWrapper childAnimation in animation)
     {
         CommitWithoutAnimation(childAnimation);
     }
     animation.Callback?.Invoke(animation.End);
 }
        private Animation PrepareAnimation(AnimationWrapper animationWrapper)
        {
            var parentAnimation = animationWrapper.Callback != null
                ? new Animation(animationWrapper.Callback, animationWrapper.Start, animationWrapper.End)
                : new Animation();

            foreach (AnimationWrapper childAnimation in animationWrapper)
            {
                var anim = PrepareAnimation(childAnimation);
                parentAnimation.Add(childAnimation.BeginsAt, childAnimation.FinishsAt, anim);
            }
            return(parentAnimation);
        }
 public void Add(double beginAt, double finishAt, AnimationWrapper animation)
 {
     animation.BeginsAt  = beginAt;
     animation.FinishsAt = finishAt;
     _children.Add(animation);
 }