forum

Home / DeveloperSection / Forums / Windows Phone 8.1 Universal App terminates on navigating back from second page?

Windows Phone 8.1 Universal App terminates on navigating back from second page?

Anonymous User225824-Apr-2015
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:
this.Frame.Navigate(typeof(Page2));
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:

public Page2()
    {
        this.InitializeComponent();
        Windows.Phone.UI.Input.HardwareButtons.BackPressed += HardwareButtons_BackPressed;
    }
    void HardwareButtons_BackPressed(object sender, Windows.Phone.UI.Input.BackPressedEventArgs e)
    {
        Frame.GoBack();
    }


As far as I know I do not clear the back stack.

What is going on, and how can I fix this?


Updated on 24-Apr-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By