Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

How to detect PopAsync back to MainView

$
0
0

There is my code:

    public partial class App : Application
    {
        public App()
        {
            MainPage = new NavigationPage(new MainPage());
        }
    }

    public partial class MainPage : ContentPage
    {
        private void Button_Clicked(object sender, EventArgs e)
        {
            this.Navigation.PushAsync(new ChannelPage());
        }
    }

public partial class ChannelPage : ContentPage
{
    private async void Channel_Clicked(object sender, EventArgs e)
    {
        await Navigation.PopAsync();
    }
}

When await Navigation.PopAsync(); run, the current page will back to MainPage.
The ChannelPage will modify some values,
so I need do some process when back to MainPage finish.

I want to know which override function can handle this event in MainPage?


Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>