private void AnimateTarget(Storyboard allAnimation, ColdAnimationTargeted target) { if (_animations.ContainsKey(target.Registered)) { if (target.RequiresPlaneProjection) EnsurePlaneProjection(target.Target); var animation = _animations[target.Registered]; Storyboard.SetTarget(animation, target.Target); allAnimation.Children.Add(animation); } }
private void BuildAndStartNewStoryboard(ColdAnimationTargeted[] targets) { _allAnimations = new Storyboard { RepeatBehavior = new RepeatBehavior(1) }; foreach (var target in targets) AnimateTarget(_allAnimations, target); _allAnimations.Begin(); }