Exemplo n.º 1
0
        private async void AnimateButton()
        {
            if (!NextButton.IsEnabled)
            {
                return;
            }

            NextButton.Scale(scaleX: 1.2f, scaleY: 1.2f, centerX: 0, centerY: 0, duration: 500, delay: 0, easingType: EasingType.Default).Start();

            if (!NextButton.IsEnabled)
            {
                return;
            }

            await Task.Delay(500);

            if (!NextButton.IsEnabled)
            {
                return;
            }

            NextButton.Scale(scaleX: 1, scaleY: 1, centerX: 0, centerY: 0, duration: 500, delay: 0, easingType: EasingType.Default).Start();

            if (!NextButton.IsEnabled)
            {
                return;
            }

            await Task.Delay(500);

            AnimateButton();
        }
Exemplo n.º 2
0
        private async void Button_Click(object sender, RoutedEventArgs e)
        {
            NextButton.IsEnabled = false;
            Click.Play();

            NextButton.Scale(scaleX: 1.3f, scaleY: 1.3f, centerX: 0, centerY: 0, duration: 200, delay: 0, easingType: EasingType.Default).Start();

            await System.Threading.Tasks.Task.Delay(200);

            NextButton.Scale(scaleX: 1, scaleY: 1f, centerX: 0, centerY: 0, duration: 200, delay: 0, easingType: EasingType.Default).Start();

            await System.Threading.Tasks.Task.Delay(1600);

            Frame.Navigate(typeof(Registration));
        }