0
public Constructor1()
{
    this.NavigationCacheMode = NavigationCacheMode.Enabled;
}

....

public Constructor2()
{
    this.NavigationCacheMode = NavigationCacheMode.Enabled;
    HardwareButtons.BackPressed += this.MainPage_BackPressed;
}

private void MainPage_BackPressed(object sender, BackPressedEventArgs e)
{
    if(this.Frame.CanGoBack)
    {
        this.Frame.GoBack();
    }
}

After I use the BackButton on my Windows Phone my Application minimizes itself. I have to go to the Task Manager and click on it to bring it back up. Any suggestions why Frame.GoBack minimizes the Application?

B. Kemmer
  • 1,517
  • 1
  • 14
  • 32
  • From which page are you pressing the back button, are there other pages below it in the stack? – Prasanna Aarthi Sep 17 '14 at 13:48
  • I only have those 2 Pages! The first page is no WebView, if it matters. I Navigate to the seconde Page which invokes a html file I've unpacked before and loads it into the WebView. When i press BackButton it minimizes the Application, but i can open the Application on Page one with help of the task manager. So it does GoBack, but it minimizes the page in the progress – B. Kemmer Sep 17 '14 at 13:51
  • http://stackoverflow.com/questions/24335925/windows-phone-8-1-universal-app-terminates-on-navigating-back-from-second-page Have a look at the above! – Kulasangar Sep 17 '14 at 15:29
  • Gosh! I am so sorry... I just forgot to set the e.Handled Property true. – B. Kemmer Sep 18 '14 at 06:46

1 Answers1

2
private void MainPage_BackPressed(object sender, BackPressedEventArgs e)
{
    if(this.Frame.CanGoBack)
    {
        e.Handled = true;
        this.Frame.GoBack();
    }
}

e.Handled = true; was the problem.

B. Kemmer
  • 1,517
  • 1
  • 14
  • 32