How do I pass data between pages in MAUI navigation?

Platform: .NET MAUI| Category: Pages

Data can be passed between pages by using the target page’s constructor or by setting properties on the target page before navigating to it. You can also use services or dependency injection.

var detailsPage = new DetailsPage();
detailsPage.BindingContext = new ViewModel(); // Set your data here
await Navigation.PushAsync(detailsPage);

Share with

Related FAQs

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

Please submit your question and answer.