XElement FromPathKeyFrameAnimation(PathKeyFrameAnimation obj) { return(new XElement(GetCompositionObjectName(obj), GetContents())); IEnumerable <XObject> GetContents() { foreach (var item in GetCompositionObjectContents(obj)) { yield return(item); } } }
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); }
PathKeyFrameAnimation(PathKeyFrameAnimation other) : base(other) { }