/// <summary> /// Stops the given animation on the property specified by the given expression. /// The expression is converted to the appropriate property string by the /// CompositionExpressionEngine /// </summary> /// <param name="compositionObject">CompositionObject</param> /// <param name="expression">Expression defining the property on which to stop the animation</param> public static void StopAnimation(this CompositionObject compositionObject, Expression <Func <object> > expression) { compositionObject.StopAnimation(CompositionExpressionEngine.ParseExpression(expression)); }
/// <summary> /// Sets the target for the encapsulated KeyFrameAnimation object /// </summary> /// <param name="targetExpression">Expression for the target</param> /// <returns>KeyFrameAnimation<T></returns> public KeyFrameAnimation <T> ForTarget(Expression <Func <object> > targetExpression) { Animation.Target = CompositionExpressionEngine.ParseExpression(targetExpression); return(this); }