Ejemplo n.º 1
0
        XElement FromPathKeyFrameAnimation(PathKeyFrameAnimation obj)
        {
            return(new XElement(GetCompositionObjectName(obj), GetContents()));

            IEnumerable <XObject> GetContents()
            {
                foreach (var item in GetCompositionObjectContents(obj))
                {
                    yield return(item);
                }
            }
        }
Ejemplo n.º 2
0
        PathKeyFrameAnimation GetPathKeyFrameAnimation(PathKeyFrameAnimation obj)
        {
            if (GetExisting(obj, out PathKeyFrameAnimation result))
            {
                return(result);
            }

            result = CacheAndInitializeKeyframeAnimation(obj, _c.CreatePathKeyFrameAnimation());
            foreach (var kf in obj.KeyFrames)
            {
                result.InsertKeyFrame(kf.Progress, GetCompositionPath(((PathKeyFrameAnimation.ValueKeyFrame)kf).Value), GetCompositionEasingFunction(kf.Easing));
            }

            StartAnimationsAndFreeze(obj, result);
            return(result);
        }
Ejemplo n.º 3
0
 PathKeyFrameAnimation(PathKeyFrameAnimation other)
     : base(other)
 {
 }