It's easy to make it. You can use NavigationMode Enumeration in OnNavigatedTo method. When back button is clicked, NavigationMode Enumeration should be NavigationMode.Back.
Please check bellow code sample.
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); //if the page transition is occurred by pressing back button. if (e.NavigationMode == System.Windows.Navigation.NavigationMode.Back) { //do something } }
As you know OnNavigatedTo is called when page transition is occurred.
No comments:
Post a Comment