Bug 25653 - NavigationPage not working after update from Xamarin.Forms 1.2 to 1.3
Summary: NavigationPage not working after update from Xamarin.Forms 1.2 to 1.3
Status: CLOSED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: All All
: High normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-30 10:36 UTC by cdetera@computronsoftware.com
Modified: 2015-01-15 05:21 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Solution using Xamarin.Forms 1.3 (3.52 MB, application/x-zip-compressed)
2014-12-30 10:36 UTC, cdetera@computronsoftware.com
Details
Solution using Xamarin.Forms 1.2 (3.74 MB, application/x-zip-compressed)
2014-12-30 10:37 UTC, cdetera@computronsoftware.com
Details


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 on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
CLOSED ANSWERED

Description cdetera@computronsoftware.com 2014-12-30 10:36:24 UTC
Created attachment 9208 [details]
Solution using Xamarin.Forms 1.3

After working on upgrading Xamarin.Forms from 1.2 to 1.3 (which includes modifying code for the new Application Lifecycle and replacing Obsolete code like the Font) my application stopped working. The application is MasterDetail page that requires modal page(s) to display.  From my investigation, it looks like the cause of the issue is setting the MainPage to a NavigationPage with a MasterDetailPage.

I've attached sample applications here to allow you to replicate what I am experiencing...

First, FormsGallery12.zip, containing a solution with references to the Xamarin.Forms 1.2 which is working fine including the displaying modal popup page.

Second, FormsGallery13.zip, containing the same solution with references to Xamarin.Forms 1.3 which doesn't work now.  Note that I did code for the new Application Lifecycle required for the Xamarin.Forms 1.3 update as well as replacing obsoleted code in this version.  In the App.cs (PCL project) note that I've added comment on the code on how to "at least" display the MasterDetail page but again, I need a NavigationPage:

public App()
{
        _NavPage = new NavigationPage(new MasterDetailPageDemoPage());

	// this code block does not work.  all that is displayed is a blank page - no master, no detail
	// found that what is causing the issue is the NavigationPage.  When the commented code below
	//  is used it worked fine but needs a NavigationPage to display the modal page!  I am surprised 
	// that I haven't seem people experiencing this in the forums... Maybe has something to do with 
	// the NavigationPage and MasterDetailPage combination.
	// -- start of non-working code
	MainPage = NavPage;
	// -- end of non-working code

	// comment off the non-working code above and uncomment the working code below to see that the page is 
	// correctly display.  However (again), how do to display the modal page now?  Navigation is required!
	// -- start of working code but cannot display modal page
	//MainPage = new MasterDetailPageDemoPage ();
	// -- end of working code but cannot display modal page 
}

With these, please do not ask me for version numbers.  I have always been using the latest Stable version of Xamarin.  If your need the version number of the Xamarin.Forms 1.2 or 1.3 I am using these can be found on the solutions I have attached and mentioned in this report.  Simply load the solutions and DO NOT update the packages.

With this issue, I am currently stuck so I decided to rollback my Xamarin.Forms version to 1.2 so as at least I can continue on with my development tasks.
Comment 1 cdetera@computronsoftware.com 2014-12-30 10:37:05 UTC
Created attachment 9209 [details]
Solution using Xamarin.Forms 1.2
Comment 2 Arpit Jha 2014-12-31 05:02:41 UTC
I have checked this issue  with the help of bug description and attached sample and observed that getting blank screen only on iPad and however its working fine with android and iOS device and simulator .

Below are my observation with following device	

Samsung S5  android 4.4.2         Working

Nexus 4 Kitkat (XAP device)       Working

iphone 4s 3( iOS 8.2)                  Working

IPad mini    (iOS 8.0.2)               Not Working

IPad2 (iOS 8.1)                           Not working.


Screencast : http://www.screencast.com/t/w9WSeTtfdNXT
Ide log : https://gist.github.com/Arpit360/c13fbb01e54e7a292814
Ios device Log : https://gist.github.com/Arpit360/3a32cbb72211b831afe7

Xamarin.forms : 1.3.0.6292

Environment Info:

=== Xamarin Studio ===

Version 5.5.4 (build 15)
Installation UUID: 3d25a767-a003-4a7d-9f5e-e57987cf6cf0
Runtime:
	Mono 3.10.0 ((detached/92c4884)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 310000031

=== Apple Developer Tools ===

Xcode 6.1 (6602)
Build 6A1052c

=== Xamarin.Mac ===

Version: 1.11.3.0 (Enterprise Edition)

=== Xamarin.Android ===

Version: 4.20.0.28 (Enterprise Edition)
Android SDK: /Users/mac360_xamarin/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Xamarin.iOS ===

Version: 8.4.0.43 (Enterprise Edition)
Hash: 840a925
Branch: 
Build date: 2014-11-16 21:03:22-0500

=== Build Information ===

Release ID: 505040015
Git revision: f93940a35458a18052f1a25e106e62ca970d9c40
Build date: 2014-11-19 15:32:41-05
Xamarin addins: dc23cbd91a3a0e1d326328e1229e86c942a49ec8

=== Operating System ===

Mac OS X 10.10.0
Darwin mac360-xamarins-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64
Comment 3 cdetera@computronsoftware.com 2015-01-02 09:49:26 UTC
So what's the next step on this?  It is obviously show stopper for my app and it's development under Xamarin.Forms 1.3.  Thanks!
Comment 4 Arpit Jha 2015-01-05 00:03:34 UTC
As per comment 3 I am updating the priority of this issue.
Comment 5 Rui Marinho 2015-01-06 11:51:20 UTC
Hi, first you shouldn't wrap MasterDetailPage in a NavigationPage, MDP is to be used more as root of your app, similiar to tab page. 
We know it worked before, but is not how is supposed to be used. 

I have fixed your sample with just small tweaks:

1 - Set MasterDetail as your main Page
	MainPage = new MasterDetailPageDemoPage();

2 - You don't need a reference to the NavigationPage , you could use Navigation property of the page you are at to push modals or to close.
        Navigation.PushModalAsync(new ModalDemoPage());

3 - Wrap your DetailPage in a NavigationPage
        	this.Detail = new NavigationPage(new NamedColorPage(true));

Here's a link for the corrected version:
https://dl.dropboxusercontent.com/u/1966569/FormsGallery13.zip
Comment 6 cdetera@computronsoftware.com 2015-01-06 12:08:14 UTC
On #3.  Is it a requirement that the DetailPage be wrapped in a NavigationPage?  Thanks!
Comment 7 Rui Marinho 2015-01-06 12:22:33 UTC
Yes if you want the Toolbar with the button.
Comment 8 Arpit Jha 2015-01-15 05:21:43 UTC
I have checked this issue with the attached project in comment 5 and now its working fine as NavigationPage working correctly.

Please feel free to reopen this issue, if you are encountering this issue again.

Screecast : http://www.screencast.com/t/pN6rg2boGdr

Environment Info:
=== Xamarin Studio ===

Version 5.7.1 (build 5)
Installation UUID: 3d25a767-a003-4a7d-9f5e-e57987cf6cf0
Runtime:
	Mono 3.12.0 ((detached/a813491)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 312000068

=== Xamarin.Android ===

Version: 4.20.0.28 (Enterprise Edition)
Android SDK: /Users/mac360_xamarin/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		2.1   (API level 7)
		2.2   (API level 8)
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
Java SDK: /usr
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)

=== Apple Developer Tools ===

Xcode 6.1 (6602)
Build 6A1052c

=== Xamarin.iOS ===

Version: 8.6.0.52 (Enterprise Edition)
Hash: 7c4c2c5
Branch: 
Build date: 2015-01-08 22:29:16-0500

=== Xamarin.Mac ===

Version: 1.10.0.18 (Enterprise Edition)

=== Build Information ===

Release ID: 507010005
Git revision: ef2b158f8e0495f6b696d97f1dc0b8208577a5a8
Build date: 2015-01-15 03:32:55-05
Xamarin addins: 12ef44f5cd3bba34b1982969f0d6a8d881ed00c9

=== Operating System ===

Mac OS X 10.10.0
Darwin mac360-xamarins-Mac-mini.local 14.0.0 Darwin Kernel Version 14.0.0
    Fri Sep 19 00:26:44 PDT 2014
    root:xnu-2782.1.97~2/RELEASE_X86_64 x86_64