Reputation: 1377
When you have a Xamarin Master/Detail app. How can you detect when the detail pages changes
Basically, when you select a new page I want to be able to detect the change and get the old page to save its data.
Any ideas ?
Upvotes: 0
Views: 38
Reputation: 70
Have you tried to override the OnDisappearing method of the page.
Example:
public partial class LoginPage : ContentPage
{
public LoginPage()
{
InitializeComponent();
}
protected override void OnDisappearing()
{
base.OnDisappearing();
//write your logic here
}
}
Upvotes: 1