public static void AddObjectAnimationUsingKeyFrames <T, TValue>(this VisualState state, T target, Expression <Func <T, TValue> > targetProperty,
                                                                 params ObjectKeyFrame[] keyFrames
                                                                 )
     where T : DependencyObject
 {
     state.GetStoryboard().AddObjectAnimationUsingKeyFrames(target, targetProperty, null, keyFrames);
 }
 public static void AddObjectAnimationUsingKeyFrames <T, TValue>(this VisualState state, T target, Expression <Func <T, TValue> > targetProperty,
                                                                 TValue keyFrame
                                                                 )
     where T : DependencyObject
 {
     state.GetStoryboard().AddObjectAnimationUsingKeyFrames(target, targetProperty, (Duration?)null, new DiscreteObjectKeyFrame(keyFrame, KeyTime.FromPercent(0)));
 }
 public static void AddColorAnimation <T, TValue>(this VisualState state, T target, Expression <Func <T, TValue> > targetProperty,
                                                  Color fromValue, Color toValue, Duration?duration = null
                                                  )
     where T : DependencyObject
 {
     state.GetStoryboard().AddAnimation(new ColorAnimation(fromValue, toValue, duration ?? new Duration(TimeSpan.FromSeconds(0))), target, targetProperty);
 }
 public static void AddAnimation <T, TValue>(this VisualState state, Timeline animation, T target, Expression <Func <T, TValue> > targetProperty)
     where T : DependencyObject
 {
     state.GetStoryboard().AddAnimation(animation, target, targetProperty);
 }