Inheritance: System.Windows.Media.Animation.DoubleAnimationBase
Exemplo n.º 1
0
 public static AnimationClock AnimatePenner(
     DependencyObject element,
     DependencyProperty prop,
     Tween.Equations type,
     double to,
     int durationMS,
     EventHandler callbackFunc,
     EventHandler durationFunc
     )
 {
     return AnimatePenner(element, prop, type, null, to, durationMS, callbackFunc, durationFunc);
 }
Exemplo n.º 2
0
        public static AnimationClock AnimatePenner(
            DependencyObject element,
            DependencyProperty prop,
            Tween.Equations type,
            double? from,
            double to,
            int durationMS,
            EventHandler callbackFunc,
            EventHandler durationFunc)
        {
            double defaultFrom = double.IsNaN((double)element.GetValue(prop)) ?
                                 0 :
                                 (double)element.GetValue(prop);

            Tween anim = new Tween(type, from.GetValueOrDefault(defaultFrom), to);
            return Animate(element, prop, anim, durationMS, null, null, callbackFunc, durationFunc);
        }