Example #1
0
        private async void ActivityIndicator_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            if (e.PropertyName == "IsRunning")
            {
                if (ActivityIndicator.IsRunning)
                {
                    new Thread(() => Buy.FadeTo(0.0, 400)).Start();
                    await Buy.TranslateTo(Buy.TranslationX, Buy.TranslationY - 300, 400);
                }
                else
                {
                    Buy.IsEnabled = false;
                    new Thread(() => Buy.FadeTo(1.0, 1000)).Start();
                    await Buy.TranslateTo(Buy.TranslationX, Buy.TranslationY + 300, 1000);

                    await Buy.TranslateTo(Buy.TranslationX, Buy.TranslationY - 7, 100);

                    await Buy.TranslateTo(Buy.TranslationX, Buy.TranslationY + 7, 150);
                }
            }
        }