Bug 34571 - Windows 8.1: Back navigation arrow disappears when navigation stack is restored
Summary: Windows 8.1: Back navigation arrow disappears when navigation stack is restored
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 1.5.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-10-05 15:38 UTC by Charles Petzold
Modified: 2017-08-30 17:03 UTC (History)
2 users (show)

Tags: Windows, ac, navigation, back, retest
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 34571 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
CONFIRMED

Description Charles Petzold 2015-10-05 15:38:26 UTC
Some programs need to save the state of the navigation stack when the program is suspended and terminated, and restore the stack the next time the program runs. A simple example is this program:

https://github.com/xamarin/xamarin-forms-book-preview-2/tree/master/Chapter24/DataTransfer6

The program consists of two pages, a Home page and an Info page, and two ViewModels, InformationViewModel and AppData. To see the problem, run the program under Windows 8.1. From the Home page, press the "Add New Item" button to navigate to the Info page. Then terminate the program and start it up again. The program restarts on the Info page but the back arrow is now gone and there is no way to get back to the Home page.

The startup logic can be found in the constructor of the App class. The program instantiates NavigationPage and the Home page as usual, but if a Boolean in the Properties dictionary is true, then it also navigates to the Info page.

The problem is also demonstrated in this program:

https://github.com/xamarin/xamarin-forms-book-preview-2/tree/master/Chapter24/StackRestoreDemo

which uses the following Application derivative to save and restore the navigation stack:

https://github.com/xamarin/xamarin-forms-book-preview-2/blob/master/Libraries/Xamarin.FormsBook.Toolkit/Xamarin.FormsBook.Toolkit/MultiPageRestorableApp.cs

However, that class has a hack that results in successfully restoring the left back arrow. The hack consists of a call to Task.Delay(250) after each call to PushAsync:

https://github.com/xamarin/xamarin-forms-book-preview-2/blob/master/Libraries/Xamarin.FormsBook.Toolkit/Xamarin.FormsBook.Toolkit/MultiPageRestorableApp.cs#L59-L65