Last active
March 4, 2016 17:23
-
-
Save dupuyjs/54c6eca3065216e837fd to your computer and use it in GitHub Desktop.
Visual Layer - Expression Animations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#region Expression Animations | |
ExpressionAnimation expressionAnimation = _compositor.CreateExpressionAnimation(); | |
expressionAnimation.Expression = "foreground.RotationAngleInDegrees < 180 ? background.Offset.X + 4.0f : background.Offset.X - 4.0f"; | |
expressionAnimation.SetReferenceParameter("background", background); | |
expressionAnimation.SetReferenceParameter("foreground", foreground); | |
background.StartAnimation("Offset.X", expressionAnimation); | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment