How do I move an element across the screen in .NET MAUI?

Platform: .NET MAUI| Category: General

You have to animate the translation of an element to move it across the screen. Here’s an example:

C#

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

Share with

Related FAQs

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

Please submit your question and answer.