/// <summary> /// Connects an ExpressionAnimation<T> with the specified property of the object /// and starts the animation. /// </summary> /// <typeparam name="T">Type of the property to be animated</typeparam> /// <param name="compositionObject">The object on whose property the animation has to /// be started.</param> /// <param name="targetProperty">Property on which the animation has to be started.</param> /// <param name="expressionAnimation">The ExpressionAnimation<T> to run on the specified property.</param> public static void StartAnimation <T>(this CompositionObject compositionObject, string targetProperty, ExpressionAnimation <T> expressionAnimation) { compositionObject.StartAnimation(targetProperty, expressionAnimation.Animation); }
/// <summary> /// Connects an ExpressionAnimation<T> with the specified property of the object /// and starts the animation. /// </summary> /// <typeparam name="T">Type of the property to be animated</typeparam> /// <param name="compositionObject">The object on whose property the animation has to /// be started.</param> /// <param name="expression">Lambda expression representing the specified property to be /// animated.</param> /// <param name="expressionAnimation">The ExpressionAnimation<T> to run on the specified property.</param> public static void StartAnimation <T>(this CompositionObject compositionObject, Expression <Func <T> > expression, ExpressionAnimation <T> expressionAnimation) { compositionObject.StartAnimation(CompositionExpressionEngine.ParseExpression(expression), expressionAnimation.Animation); }