public void AddPathAnimationSceneNode(PathAnimationSceneNode pathAnimation) { if (pathAnimation.TargetProperty == pathAnimation.Platform.Metadata.CommonProperties.TranslationX) { this.InsertScheduledAnimation(0, (TimelineSceneNode)pathAnimation); } else { this.AddScheduledAnimation((TimelineSceneNode)pathAnimation); } }
public override void UpdateFromDamage(SceneUpdatePhaseEventArgs args) { this.AddCriticalEdit(); bool flag = false; PathAnimationSceneNode pathAnimation = this.GetPathAnimation(); if ((args.DirtyViewState & SceneViewModel.ViewStateBits.ActiveTimeline) != SceneViewModel.ViewStateBits.None || args.IsRadicalChange || pathAnimation != null && args.DocumentChanges.Contains(pathAnimation.DocumentNode)) { flag = true; } if (pathAnimation != null) { SceneNode valueAsSceneNode = pathAnimation.GetLocalValueAsSceneNode(PathAnimationSceneNode.PathGeometryProperty); if (valueAsSceneNode != null && args.DocumentChanges.Contains(valueAsSceneNode.DocumentNode)) { flag = true; } } if (!flag && this.ViewModel.AnimationEditor.ActiveStoryboardTimeline != null) { DocumentNode documentNode = this.ViewModel.AnimationEditor.ActiveStoryboardTimeline.DocumentNode; foreach (DocumentNodeChange documentNodeChange in args.DocumentChanges.DistinctChanges) { if (documentNodeChange.ParentNode != null && documentNodeChange.ParentNode.Parent == documentNode) { flag = true; break; } } } if (!flag) { return; } this.UpdateCachedPath(); }
public void RemovePathAnimationSceneNode(PathAnimationSceneNode pathAnimation) { this.RemoveScheduledAnimation((TimelineSceneNode)pathAnimation); }
public PathTimelineItem(TimelineItemManager timelineItemManager, StoryboardTimelineSceneNode parentTimeline, PathAnimationSceneNode pathAnimationSceneNode) : base(timelineItemManager, parentTimeline, (AnimationSceneNode)pathAnimationSceneNode) { this.orientToPathCommand = new DelegateCommand(new DelegateCommand.SimpleEventHandler(this.OrientToPathCommandBinding_Execute)); }
public override void UpdateCachedPath() { PathAnimationSceneNode pathAnimation = this.GetPathAnimation(); this.PathGeometry = pathAnimation == null || pathAnimation.Path == null ? new PathGeometry() : PathGeometryUtilities.Copy(pathAnimation.Path, true); }