public static void StartAnimation(this GeneralTransform transform, DependencyProperty dp, double dValue) { var animation = new DoubleAnimation { To = dValue, Duration = new Duration(TimeSpan.FromMilliseconds(100)), EasingFunction = new QuadraticEase() }; transform.BeginAnimation(dp, animation); }