Example #1
0
 public MatrixAnimation(Matrix fromValue, Matrix toValue, Duration duration, FillBehavior fillBehavior)
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
 public GridLengthAnimation(GridLength fromValue, GridLength toValue, Duration duration, FillBehavior fillBehavior)
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
 public LinearGradientAnimation(LinearGradientBrush toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     this.To = toValue;
     base.Duration = duration;
     base.FillBehavior = fillBehavior;
 }
 public DoubleAnimation(double from, double to, Duration duration, FillBehavior fillBehavior)
 {
   this.From = from;
   this.To = to;
   this.Duration = duration;
   this.FillBehavior = fillBehavior;
 }
 public RangeAnimation(Range from, Range to, Duration duration, FillBehavior fillBehavior = FillBehavior.Stop, IEasingFunction easingFunction = null)
 {
     From = from;
     To = to;
     Duration = duration;
     FillBehavior = fillBehavior;
     EasingFunction = easingFunction;
 }
Example #6
0
 public void Begin(IRootClock rootClock)
 {
     this.rootClock = rootClock;
     VerifyRootClock();
     beginTime = rootClock.Time;
     currentFillBehavior = Timeline.FillBehavior;
     rootClock.AddClock(this);
     Tick(rootClock.Time);
 }
Example #7
0
 public static Storyboard CreateDoubleAnimation(double? from, double? to, double duration, string propertyName, FrameworkElement target, FillBehavior? fillBehavior = null, EventHandler<object> onCompleted = null)
 {
     var animation = new DoubleAnimation 
     { 
         From = from, 
         To = to, 
         Duration = new Duration(TimeSpan.FromMilliseconds(duration)), 
         EnableDependentAnimation = true ,
         //FillBehavior = fillBehavior
         //EasingFunction = new ExponentialEase() { EasingMode = EasingMode.EaseOut }
     };
     
     if (fillBehavior.HasValue)
         animation.FillBehavior = fillBehavior.Value;
     var sb = new Storyboard();
     Storyboard.SetTarget(animation, target);
     Storyboard.SetTargetProperty(animation, propertyName);
     sb.Children.Add(animation);
     if(onCompleted != null)
         sb.Completed += onCompleted;
     return sb;
 }
 public GUIAnimation(GUIAnimation a)
   : base(a._parentControlId, a._controlId, a._positionX, a._positionY, a._width, a._height)
 {
   _animating = false;
   _isFirstRender = true;
   _iterationCount = 0;
   _startTick = 0;
   _hidePngAnimations = false;
   _triggerList = a._triggerList.GetRange(0, a._triggerList.Count);
   _easing = a._easing;
   _fillBehavior = a._fillBehavior;
   _horizontalAlignment = a._horizontalAlignment;
   _textureNames = a._textureNames;
   _rate = a._rate;
   _duration = a._duration;
   _repeatBehavior = a._repeatBehavior;
   _verticalAlignment = a._verticalAlignment;
   _triggerNames = a._triggerNames;
   InitTriggerList();
 }
 public Int64Animation(long fromValue, long toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
Example #10
0
 public VectorAnimation(Vector fromValue, Vector tovalue, Duration duration, FillBehavior fillBehavior)
 {
 }
Example #11
0
 public ColorAnimation(Color fromValue, Color tovalue, Duration duration, FillBehavior fillBehavior)
 {
 }
 /// <summary>
 /// Creates a new CornerRadiusAnimation that will animate a
 /// CornerRadius property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public CornerRadiusAnimation(CornerRadius fromValue, CornerRadius toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
Example #13
0
 public Vector3DAnimation(System.Windows.Media.Media3D.Vector3D fromValue, System.Windows.Media.Media3D.Vector3D toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
Example #14
0
 /// <summary>
 /// Creates a new Rotation3DAnimation that will animate a
 /// Rotation3D property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public Rotation3DAnimation(Rotation3D fromValue, Rotation3D toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #15
0
 /// <summary> 
 /// Creates a new SizeAnimation that will animate a
 /// Size property from the "fromValue" parameter of this constructor 
 /// to the "toValue" parameter. 
 /// </summary>
 public SizeAnimation(Size fromValue, Size toValue, Duration duration, FillBehavior fillBehavior) 
     : this()
 {
     From = fromValue;
     To = toValue; 
     Duration = duration;
     FillBehavior = fillBehavior; 
 } 
Example #16
0
 public DecimalAnimation(Decimal fromValue, Decimal tovalue, Duration duration, FillBehavior fillBehavior)
 {
 }
Example #17
0
 /// <summary>
 /// Initializes a new instance of the <see cref="T:System.Windows.Media.Animation.ThicknessAnimation"/> class that animates from the specified starting value to the specified destination value over the specified duration and has the specified fill behavior.
 /// </summary>
 /// <param name="fromValue">The starting value of the animation.</param><param name="toValue">The destination value of the animation. </param><param name="duration">The length of time the animation takes to play from start to finish, once. See the <see cref="P:System.Windows.Media.Animation.Timeline.Duration"/> property for more information.</param><param name="fillBehavior">Specifies how the animation behaves when it is not active.</param>
 public CornerAnimation(CornerRadius fromValue, CornerRadius toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     this.From         = new CornerRadius?(fromValue);
     this.To           = new CornerRadius?(toValue);
     this.Duration     = duration;
     this.FillBehavior = fillBehavior;
 }
 /// <summary>
 /// Creates a new Point3DAnimation that will animate a
 /// Point3D property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public Point3DAnimation(Point3D fromValue, Point3D toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #19
0
        public static void Rotate(FrameworkElement target, double toValue, TimeSpan timeSpan, Action completed = null, FillBehavior behavior = FillBehavior.HoldEnd)
        {
            const bool isFromValue = false;

            Rotate(target, default, toValue, new Point(target.ActualWidth / 2, target.ActualHeight / 2), timeSpan, behavior, isFromValue, completed);
Example #20
0
 /// <summary>
 /// Creates a new DecimalAnimation that will animate a
 /// Decimal property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public DecimalAnimation(Decimal fromValue, Decimal toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #21
0
	public Int32Animation (int fromValue, int tovalue, Duration duration, FillBehavior fillBehavior)
	{
	}
Example #22
0
 /// <summary> Initializes a new instance of the <see cref="T:System.Windows.Media.Animation.ThicknessAnimation" /> class that animates from the specified starting value to the specified destination value over the specified duration and has the specified fill behavior. </summary>
 /// <param name="fromValue">The starting value of the animation.</param>
 /// <param name="toValue">The destination value of the animation. </param>
 /// <param name="duration">The length of time the animation takes to play from start to finish, once. See the <see cref="P:System.Windows.Media.Animation.Timeline.Duration" /> property for more information.</param>
 /// <param name="fillBehavior">Specifies how the animation behaves when it is not active.</param>
 // Token: 0x0600173F RID: 5951 RVA: 0x00072022 File Offset: 0x00070222
 public ThicknessAnimation(Thickness fromValue, Thickness toValue, Duration duration, FillBehavior fillBehavior) : this()
 {
     this.From         = new Thickness?(fromValue);
     this.To           = new Thickness?(toValue);
     base.Duration     = duration;
     base.FillBehavior = fillBehavior;
 }
 public PointAnimation(System.Windows.Point toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
 /// <summary>
 /// Creates a new ColorAnimation that will animate a
 /// Color property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public ColorAnimation(Color fromValue, Color toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
 /// <summary>
 /// Creates a new RectAnimation that will animate a
 /// Rect property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public RectAnimation(Rect fromValue, Rect toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
Example #26
0
 public Int64Animation(long fromValue, long tovalue, Duration duration, FillBehavior fillBehavior)
 {
 }
 /// <summary>
 /// Creates a new Vector3DAnimation that will animate a
 /// Vector3D property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public Vector3DAnimation(Vector3D fromValue, Vector3D toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #28
0
 public GeometryAnimation(Geometry fromValue, Geometry toValue, Duration duration, FillBehavior fillBehavior) : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #29
0
 /// <summary> 
 /// Creates a new Int16Animation that will animate a
 /// Int16 property from the "fromValue" parameter of this constructor 
 /// to the "toValue" parameter. 
 /// </summary>
 public Int16Animation(Int16 fromValue, Int16 toValue, Duration duration, FillBehavior fillBehavior) 
     : this()
 {
     From = fromValue;
     To = toValue; 
     Duration = duration;
     FillBehavior = fillBehavior; 
 } 
Example #30
0
 /// <summary>
 /// Creates a new CornerRadiusAnimation that will animate a
 /// CornerRadius property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public CornerRadiusAnimation(CornerRadius fromValue, CornerRadius toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
 public SingleAnimation(float toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
Example #32
0
 public ColorLightnessAnimation(float fromValue, float toValue, Duration duration, FillBehavior fillBehavior) : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #33
0
 public MatrixAnimation(Matrix toValue, Duration duration, FillBehavior fillBehavior)
 {
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #34
0
        /// <summary>
        /// Start thinkness animation.
        /// </summary>
        /// <param name="parent">Object that contains property.</param>
        /// <param name="propertyName">A name of the property.</param>
        /// <param name="propertyPath">A path that describe the dependency property to be animated.</param>
        /// <param name="duration">How many time would take transit.</param>
        /// <param name="from">Start value.</param>
        /// <param name="to">Finish value.</param>
        /// <param name="fillBehavior">
        /// Specifies how a System.Windows.Media.Animation.Timeline behaves when it is outside
        /// its active period but its parent is inside its active or hold period.</param>
        /// <param name="initHandler">Handler that would be called before animation start.
        /// There you can subscrube on events or reconfigurate settigns.</param>
        /// <returns>Created storyboard.</returns>
        public static Storyboard StartStoryboard(
            FrameworkElement parent,
            string propertyName,
            PropertyPath propertyPath,
            TimeSpan duration,
            Thickness from,
            Thickness to,
            FillBehavior fillBehavior,
            Action <Storyboard> initHandler)
        {
            // Create a storyboard to contains the animations.
            Storyboard storyboard = new Storyboard
            {
                FillBehavior = fillBehavior
            };

            // Add the animation to the storyboard
            ThicknessAnimationUsingKeyFrames animation = new ThicknessAnimationUsingKeyFrames();

            storyboard.Children.Add(animation);
            animation.Duration          = new Duration(duration);
            animation.AccelerationRatio = 1.0f;

            // Set start position.
            SplineThicknessKeyFrame startKey = new SplineThicknessKeyFrame(
                from,
                KeyTime.FromPercent(0));

            //// Set start position.
            //SplineThicknessKeyFrame middleKey = new SplineThicknessKeyFrame(
            //    new Thickness(Lerp(from.Left, to.Right, ),
            //    KeyTime.FromPercent(0.62));

            // Set finish position.
            SplineThicknessKeyFrame finishKey = new SplineThicknessKeyFrame(
                to,
                KeyTime.FromPercent(1));

            // Configure the animation to target de property Opacity
            Storyboard.SetTargetName(animation, propertyName);
            Storyboard.SetTargetProperty(animation, propertyPath);


            // Add keys.
            animation.KeyFrames.Add(startKey);
            //animation.KeyFrames.Add(middleKey);
            animation.KeyFrames.Add(finishKey);

            // Inform subscribers.
            initHandler?.Invoke(storyboard);

            // Begin the storyboard
            try
            {
                storyboard.Begin(parent);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            return(storyboard);
        }
 /// <summary>
 ///     Initializes a new instance of the <see cref="LinearAnimationBase{T}" /> class that animates from the specified
 ///     starting value to the specified destination value over the specified duration and has the specified fill behavior.
 /// </summary>
 /// <param name="fillBehavior">Specifies how the animation behaves when it is not active.</param>
 /// <param name="toValue">The destination value of the animation. </param>
 /// <param name="duration">
 ///     The length of time the animation takes to play from start to finish, once. See the Duration
 ///     property for more information.
 /// </param>
 /// <param name="fromValue">The starting value of the animation.</param>
 protected LinearAnimationBase(T fromValue, T toValue, Duration duration, FillBehavior fillBehavior)
     : this(fromValue, toValue, duration)
 {
     FillBehavior = fillBehavior;
 }
Example #36
0
 public Rotation3DAnimation(System.Windows.Media.Media3D.Rotation3D toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
 public DoubleAnimation(double fromValue, double toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
 public LinearGradientAnimation(LinearGradientBrush fromValue, LinearGradientBrush toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     this.From         = fromValue;
     this.To           = toValue;
     base.Duration     = duration;
     base.FillBehavior = fillBehavior;
 }
 public Int16Animation(short fromValue, short toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
Example #40
0
 /// <summary>
 /// Creates a new SingleAnimation that will animate a
 /// Single property from its base value to the value specified
 /// by the "toValue" parameter of this constructor.
 /// </summary>
 public SingleAnimation(Single toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
Example #41
0
	public DoubleAnimation (double fromValue, double tovalue, Duration duration, FillBehavior fillBehavior)
	{
	}
Example #42
0
	public Int64Animation (long fromValue, long tovalue, Duration duration, FillBehavior fillBehavior)
	{
	}
 public ColorAnimation(System.Windows.Media.Color toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
Example #44
0
 /// <summary>
 /// Creates a new ThicknessAnimation that will animate a
 /// Thickness property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public ThicknessAnimation(Thickness fromValue, Thickness toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #45
0
 /// <summary> 
 /// Creates a new DoubleAnimation that will animate a
 /// Double property from the "fromValue" parameter of this constructor 
 /// to the "toValue" parameter. 
 /// </summary>
 public DoubleAnimation(Double fromValue, Double toValue, Duration duration, FillBehavior fillBehavior) 
     : this()
 {
     From = fromValue;
     To = toValue; 
     Duration = duration;
     FillBehavior = fillBehavior; 
 } 
Example #46
0
 /// <summary>
 /// Creates a new DoubleAnimation that will animate a
 /// Double property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public Matrix3DAnimation(Matrix3D fromValue, Matrix3D toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From         = fromValue;
     To           = toValue;
     Duration     = duration;
     FillBehavior = fillBehavior;
 }
Example #47
0
 /// <summary>
 /// Creates a new DecimalAnimation that will animate a
 /// Decimal property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public DecimalAnimation(Decimal fromValue, Decimal toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
 /// <summary>
 /// Creates a new Int64Animation that will animate a
 /// Int64 property from its base value to the value specified
 /// by the "toValue" parameter of this constructor.
 /// </summary>
 public Int64Animation(Int64 toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
 /// <summary>
 /// Creates a new ThicknessAnimation that will animate a
 /// Thickness property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public ThicknessAnimation(Thickness fromValue, Thickness toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
Example #50
0
 /// <summary> 
 /// Creates a new Rotation3DAnimation that will animate a
 /// Rotation3D property from the "fromValue" parameter of this constructor 
 /// to the "toValue" parameter. 
 /// </summary>
 public Rotation3DAnimation(Rotation3D fromValue, Rotation3D toValue, Duration duration, FillBehavior fillBehavior) 
     : this()
 {
     From = fromValue;
     To = toValue; 
     Duration = duration;
     FillBehavior = fillBehavior; 
 } 
Example #51
0
 /// <summary>
 /// Creates a new ByteAnimation that will animate a
 /// Byte property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public ByteAnimation(Byte fromValue, Byte toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
Example #52
0
 public CameraRotateAnimation(CameraLookDirection fromValue, IEnumerable <CameraLookDirection> tosValue, Duration duration, FillBehavior fillBehavior)
 {
     From         = fromValue;
     Tos          = tosValue;
     Duration     = duration;
     FillBehavior = FillBehavior;
 }
 /// <summary>
 /// Creates a new Vector3DAnimation that will animate a
 /// Vector3D property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public Vector3DAnimation(Vector3D fromValue, Vector3D toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
Example #54
0
 static internal bool IsValidFillBehavior(FillBehavior value)
 {
     return(0 <= value && (int)value <= c_maxFillBehavior);
 }
 /// <summary>
 /// Creates a new PointAnimation that will animate a
 /// Point property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public PointAnimation(Point fromValue, Point toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
Example #56
0
 public DoubleAnimationEx(double fromValue, double toValue, Duration duration, FillBehavior fillBehavior) : base(fromValue, toValue, duration, fillBehavior)
 {
 }
 public SingleAnimation(float toValue, System.Windows.Duration duration, FillBehavior fillBehavior)
 {
 }
Example #58
0
        public static FillBehavior Unbox_FillBehavior(IntPtr val)
        {
            FillBehavior ret = (FillBehavior)NoesisGUI_PINVOKE.Unbox_FillBehavior(val);

            return(ret);
        }
 /// <summary>
 /// Creates a new QuaternionAnimation that will animate a
 /// Quaternion property from the "fromValue" parameter of this constructor
 /// to the "toValue" parameter.
 /// </summary>
 public QuaternionAnimation(Quaternion fromValue, Quaternion toValue, Duration duration, FillBehavior fillBehavior)
     : this()
 {
     From = fromValue;
     To = toValue;
     Duration = duration;
     FillBehavior = fillBehavior;
 }
Example #60
0
        public static IntPtr Box_FillBehavior(FillBehavior val)
        {
            IntPtr ret = NoesisGUI_PINVOKE.Box_FillBehavior((int)val);

            return(ret);
        }