How can I chain animations one after the other in .NET MAUI?

Platform: .NET MAUI| Category: General

You can chain animations by using await and running them sequentially.

C#

async void OnAnimateClicked(object sender, EventArgs e)
{
	//whenever the button is clicked
	await ChainAnimations(animatedLabel);
}
async Task ChainAnimations(View view)
{
	await view.FadeTo(0, 500);
	await view.TranslateTo(100, 0, 500);
	await view.FadeTo(1, 500);
}

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.