Beispiel #1
0
 private void RotationTaskTimer_Elapsed(object sender, ElapsedEventArgs e)
 {
     LblLoader.Animate("RotateLoader", (x) =>
     {
         LblLoader.Rotation = 360 * x;
     }, length: AppThemeConstants.AnimationSpeed, easing: Easing.SinInOut);
 }
Beispiel #2
0
        private void OnHideUnhideViewAnimationMessage(object sender, HideUnhideViewAnimationMessage message)
        {
            if (message.IsHiding)
            {
                if (!string.IsNullOrEmpty(TxtSearch.Text))
                {
                    LblLoader.IsVisible = true;
                    LblLoader.FadeTo(1, AppThemeConstants.AnimationSpeed, Easing.SinInOut);
                    LblLoader.TranslateTo(0, Height / 3.5, AppThemeConstants.AnimationSpeed, Easing.SinInOut);
                    _rotationTaskTimer.Start();
                }

                LvSearchedRestaurants.TranslateTo(0, Height, AppThemeConstants.AnimationSpeed, Easing.SinInOut);
                LvSearchedRestaurants.FadeTo(0, AppThemeConstants.AnimationSpeed, Easing.SinInOut);
            }
            else
            {
                _rotationTaskTimer.Stop();
                LblLoader.Animate("HideLoader", (x) =>
                {
                    LblLoader.TranslationY = (Height / 3.5) * (1 - x);
                }, length: AppThemeConstants.AnimationSpeed, easing: Easing.SinInOut, finished: (x, y) =>
                {
                    LblLoader.IsVisible = false;
                });
                LblLoader.FadeTo(0, AppThemeConstants.AnimationSpeed, Easing.SinInOut);
                LvSearchedRestaurants.TranslateTo(0, 0, AppThemeConstants.AnimationSpeed, Easing.SinInOut);
                LvSearchedRestaurants.FadeTo(1, AppThemeConstants.AnimationSpeed, Easing.SinInOut);
            }
        }