Reputation: 271
I have a content page with some details and a button named "Update details" to update the content in this page. Another page is opened through the Navigation.PushAsync
method where I update the details in this page and click the save button.
How can I update the previous page with the new details when I click the save button on the other page? Should I refresh the previous page on buttonClick?
Upvotes: 1
Views: 2649
Reputation: 1802
You can update the previous page by using the MessagingCenter: https://developer.xamarin.com/guides/xamarin-forms/messaging-center/
You can subscribe to a message in the first page and when you click save on the second page, you can send a message to the first page and update the content on that page.
Upvotes: 1