Example #1
0
        public override void Stop()
        {
            base.Stop();

            _isRunning = false;
            AnimationStopped?.Invoke(this, new FormsAnimationDrawableStateEventArgs(_finished));
        }
Example #2
0
        public override void Stop()
        {
            base.Stop();

            if (!System.Maui.Maui.IsLollipopOrNewer)
            {
                base.SetVisible(false, true);
            }

            _isRunning = false;
            AnimationStopped?.Invoke(this, new FormsAnimationDrawableStateEventArgs(_finished));
        }
Example #3
0
        /// <summary>
        /// Handles timer Tick event forcing MapView to redraw.
        /// </summary>
        /// <param name="sender">Event source.</param>
        /// <param name="e">Empty EventArgs.</param>
        private void Update(object sender, EventArgs e)
        {
            time += timer.Interval;
            if (time > animationTime)
            {
                time = animationTime;
            }

            mapView.Invalidate();

            if (time >= animationTime)
            {
                timer.Tick -= Update;
                timer.Stop();
                AnimationStopped?.Invoke(this, EventArgs.Empty);
            }
        }
Example #4
0
 /// <summary>
 /// Called when animation stopped.
 /// </summary>
 void _viewFieldAnimator_Stopped(ViewFieldAnimator viewFieldAnimator)
 {
     AnimationStopped.Trigger();
 }
 /// <summary>
 /// Stops the animation.
 /// </summary>
 public override void StopAnimation()
 {
     this.ForEachChild <ViewAnimation>(x => x.StopAnimation(), false);
     AnimationStopped.Trigger();
 }
Example #6
0
 void OnAnimationStopped(object sender, CoreAnimation.CAAnimationStateEventArgs e)
 {
     AnimationStopped?.Invoke(this, e);
 }