I have 2 pages in my Windows Phone 8.1 Universal App.
I navigate from Page1.xaml to Page2.xaml by using a button with the click event code:
When I am on Page2, and I use the hardware back button the app closes without an exception or anything. It just returns to the startscreen.
I already tried the following on Page 2:
Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
As far as I know I do not clear the back stack.
What is going on, and how can I fix this?