private async void CommitShakeAnimation() { uint timeout = 50; await Task.WhenAll(new List <Task> { BGSymbolImage.TranslateTo(-15, 0, timeout), HeroImage1.TranslateTo(-15, 0, timeout), LabelDate.TranslateTo(-15, 0, timeout), LabelTime.TranslateTo(-15, 0, timeout), HeroImage3.TranslateTo(-15, 0, timeout) }); await Task.WhenAll(new List <Task> { BGSymbolImage.TranslateTo(15, 0, timeout), HeroImage1.TranslateTo(15, 0, timeout), LabelDate.TranslateTo(15, 0, timeout), LabelTime.TranslateTo(15, 0, timeout), HeroImage3.TranslateTo(15, 0, timeout) }); await Task.WhenAll(new List <Task> { BGSymbolImage.TranslateTo(-9, 0, timeout), HeroImage1.TranslateTo(-9, 0, timeout), LabelDate.TranslateTo(-9, 0, timeout), LabelTime.TranslateTo(-9, 0, timeout), HeroImage3.TranslateTo(-9, 0, timeout) }); await Task.WhenAll(new List <Task> { BGSymbolImage.TranslateTo(9, 0, timeout), HeroImage1.TranslateTo(9, 0, timeout), LabelDate.TranslateTo(9, 0, timeout), LabelTime.TranslateTo(9, 0, timeout), HeroImage3.TranslateTo(9, 0, timeout) }); await Task.WhenAll(new List <Task> { BGSymbolImage.TranslateTo(-5, 0, timeout), HeroImage1.TranslateTo(-5, 0, timeout), LabelDate.TranslateTo(-5, 0, timeout), LabelTime.TranslateTo(-5, 0, timeout), HeroImage3.TranslateTo(-5, 0, timeout) }); await Task.WhenAll(new List <Task> { BGSymbolImage.TranslateTo(5, 0, timeout), HeroImage1.TranslateTo(5, 0, timeout), LabelDate.TranslateTo(5, 0, timeout), LabelTime.TranslateTo(5, 0, timeout), HeroImage3.TranslateTo(5, 0, timeout) }); await Task.WhenAll(new List <Task> { BGSymbolImage.TranslateTo(-2, 0, timeout), HeroImage1.TranslateTo(-2, 0, timeout), LabelDate.TranslateTo(-2, 0, timeout), LabelTime.TranslateTo(-2, 0, timeout), HeroImage3.TranslateTo(-2, 0, timeout) }); await Task.WhenAll(new List <Task> { BGSymbolImage.TranslateTo(2, 0, timeout), HeroImage1.TranslateTo(2, 0, timeout), LabelDate.TranslateTo(2, 0, timeout), LabelTime.TranslateTo(2, 0, timeout), HeroImage3.TranslateTo(2, 0, timeout) }); BGSymbolImage.TranslationX = 0; LabelDate.TranslationX = 0; LabelTime.TranslationX = 0; HeroImage1.TranslationX = 0; HeroImage3.TranslationX = 0; }
private Task <bool> BGColorChangeTask(Color from, Color to) { return(BGSymbolImage.ColorTo(from, to, c => BGSymbolImage.BackgroundColor = c, 100)); }