I am making a multiple choice quiz app in xamarin forms as like attached image

when i click next button then next question and answer is coming but i want to put animation on that. I want when i clicked on "next" button four option will come from bottom in fly in effect.any effect is acceptable, no issue. But my actual issue is when i used await TranslateTo or ScaleTo in all button it will happen but the effect is coming one by one. After first button effect complete then second is starting, But i need same effect in all 4 button in same time. if anybody suggest it can be helpful to me.

Sandhiya PriyaRank #26 · 43.2K reputationPosted Jan 2, 2026, 6:05 AM EST
the issue is that you’re awaiting each
TranslateTo/ScaleTocall sequentially, so the animations run one after another. To make them run in parallel, you need to start all animations at once and then await them together.Solution: Use
Task.WhenAllInstead of:
await btn1.TranslateTo(0, 0, 500); await btn2.TranslateTo(0, 0, 500); await btn3.TranslateTo(0, 0, 500); await btn4.TranslateTo(0, 0, 500);Do this:
var tasks = new List { btn1.TranslateTo(0, 0, 500, Easing.SinOut), btn2.TranslateTo(0, 0, 500, Easing.SinOut), btn3.TranslateTo(0, 0, 500, Easing.SinOut), btn4.TranslateTo(0, 0, 500, Easing.SinOut) }; await Task.WhenAll(tasks);This way, all four buttons animate simultaneously with the same fly-in effect.
Example: Fly-In From Bottom
Before starting animation, position buttons off-screen (e.g.,
TranslationY = 600):btn1.TranslationY = 600; btn2.TranslationY = 600; btn3.TranslationY = 600; btn4.TranslationY = 600; await Task.WhenAll( btn1.TranslateTo(0, 0, 500, Easing.SinOut), btn2.TranslateTo(0, 0, 500, Easing.SinOut), btn3.TranslateTo(0, 0, 500, Easing.SinOut), btn4.TranslateTo(0, 0, 500, Easing.SinOut) );Tips
Use
Easing.SinOutorEasing.CubicOutfor a smooth fly-in.You can stagger them slightly with
Task.Delayif you want a cascading effect.Works for
TranslateTo,ScaleTo,FadeTo, etc.Note
Animations in Xamarin.Forms run sequentially if you
awaitthem one by one.Use
Task.WhenAllto run multiple animations in parallel.