コード例 #1
0
        private IList <AnimationTimeline> PrepareAnimation(AnimationBase animation)
        {
            var target = GetAnimationTarget(animation, _host);

            if (target == null)
            {
                return(null);
            }

            var timelines = animation.GetTimeline();

            var timlineList = timelines as IList <AnimationTimeline> ?? timelines.ToList();

            foreach (var timeline in timlineList)
            {
                Storyboard.SetTarget(timeline, target);
            }

            return(timlineList);
        }