// Path 1.PathGeometry CompositionPathGeometry PathGeometry_2() { var result = _c.CreatePathGeometry(new CompositionPath(Geometry_2())); var propertySet = result.Properties; propertySet.InsertScalar("TStart", 1); propertySet.InsertScalar("TEnd", 1); _reusableExpressionAnimation.ClearAllParameters(); _reusableExpressionAnimation.Expression = "Min(my.TStart, my.TEnd)"; _reusableExpressionAnimation.SetReferenceParameter("my", result); result.StartAnimation("TrimStart", _reusableExpressionAnimation); _reusableExpressionAnimation.ClearAllParameters(); _reusableExpressionAnimation.Expression = "Max(my.TStart, my.TEnd)"; _reusableExpressionAnimation.SetReferenceParameter("my", result); result.StartAnimation("TrimEnd", _reusableExpressionAnimation); result.StartAnimation("TStart", TStartScalarAnimation_1_to_0_0()); var controller = result.TryGetAnimationController("TStart"); controller.Pause(); controller.StartAnimation("Progress", _scalarExpressionAnimation); result.StartAnimation("TEnd", TEndScalarAnimation_1_to_0_0()); controller = result.TryGetAnimationController("TEnd"); controller.Pause(); controller.StartAnimation("Progress", _scalarExpressionAnimation); return(result); }
void BindProperty( CompositionObject target, string animatedPropertyName, string expression, string referenceParameterName, CompositionObject referencedObject) { _reusableExpressionAnimation.ClearAllParameters(); _reusableExpressionAnimation.Expression = expression; _reusableExpressionAnimation.SetReferenceParameter(referenceParameterName, referencedObject); target.StartAnimation(animatedPropertyName, _reusableExpressionAnimation); }
// Layer (Shape): Shape Layer 1 CompositionContainerShape ContainerShape_3() { var result = _c.CreateContainerShape(); result.TransformMatrix = new Matrix3x2(0, 0, 0, 0, 0, 0); var shapes = result.Shapes; shapes.Add(SpriteShape_3()); result.StartAnimation("TransformMatrix._11", ScalarAnimation_1_to_0()); var controller = result.TryGetAnimationController("TransformMatrix._11"); controller.Pause(); controller.StartAnimation("Progress", _scalarExpressionAnimation); _reusableExpressionAnimation.ClearAllParameters(); _reusableExpressionAnimation.Expression = "my.TransformMatrix._11"; _reusableExpressionAnimation.SetReferenceParameter("my", result); result.StartAnimation("TransformMatrix._22", _reusableExpressionAnimation); return(result); }
// contour // contour.PathGeometry CompositionPathGeometry PathGeometry_1() { var result = _c.CreatePathGeometry(new CompositionPath(Geometry_3())); result.StartAnimation("TrimEnd", TrimEndScalarAnimation_0_to_1()); var controller = result.TryGetAnimationController("TrimEnd"); controller.Pause(); _reusableExpressionAnimation.ClearAllParameters(); _reusableExpressionAnimation.Expression = "_.Progress"; _reusableExpressionAnimation.SetReferenceParameter("_", _root); controller.StartAnimation("Progress", _reusableExpressionAnimation); return(result); }
// Ellipse Path // Ellipse Path.EllipseGeometry CompositionEllipseGeometry Ellipse_7_1() { var result = _c.CreateEllipseGeometry(); result.Radius = new Vector2(7, 7); result.StartAnimation("TrimEnd", TrimEndScalarAnimation_0_to_1()); var controller = result.TryGetAnimationController("TrimEnd"); controller.Pause(); _reusableExpressionAnimation.ClearAllParameters(); _reusableExpressionAnimation.Expression = "_.Progress"; _reusableExpressionAnimation.SetReferenceParameter("_", _root); controller.StartAnimation("Progress", _reusableExpressionAnimation); return(result); }
// Layer (Shape): cross-2 CompositionContainerShape ContainerShape_1() { var result = _c.CreateContainerShape(); var propertySet = result.Properties; propertySet.InsertVector2("Position", new Vector2(40.5F, 40.5F)); var shapes = result.Shapes; shapes.Add(SpriteShape_1()); _reusableExpressionAnimation.ClearAllParameters(); _reusableExpressionAnimation.Expression = "Vector2((my.Position.X),(my.Position.Y))"; _reusableExpressionAnimation.SetReferenceParameter("my", result); result.StartAnimation("Offset", _reusableExpressionAnimation); result.StartAnimation("Position", PositionVector2Animation_0()); var controller = result.TryGetAnimationController("Position"); controller.Pause(); controller.StartAnimation("Progress", _scalarExpressionAnimation); return(result); }