In my app, I have 3 pages:
- MainPage
- Page2
- Page3
I want to go back from Page 3 to Page2 and to MainPage by Back device button. So How should I do it?
Help me, please!
In my app, I have 3 pages:
I want to go back from Page 3 to Page2 and to MainPage by Back device button. So How should I do it?
Help me, please!
Navigation
in WP 8.1 is totally different from the WP8, where here you only have to use Frame.Navigate
and then give the Uri
.
A perfect reference would be this.
Hope it helps!
Create an event for the hardware event like this:
Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
And then handle the event accordingly:
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
{
Frame.Navigate(typeof(MainPage)); // page you want to navigate to
e.Handled = true;
}
Hope this helps