Bug 51802 - [UWP] Detail Page Has Navigation Bar Even When Not Inside a NavigationPage
Summary: [UWP] Detail Page Has Navigation Bar Even When Not Inside a NavigationPage
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows (show other bugs)
Version: 2.3.4
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-01-26 20:46 UTC by Jimmy [MSFT]
Modified: 2017-03-14 19:38 UTC (History)
5 users (show)

See Also:
Tags: bug, uwp, masterdetailpage, navbar
Is this bug a regression?: Yes
Last known good build: 2.3.3.168


Attachments
repro project (247.85 KB, application/zip)
2017-01-26 20:46 UTC, Jimmy [MSFT]
Details
Reproduces UWP toolbar issue in Forms Prism app (94.54 KB, application/x-rar)
2017-03-06 16:22 UTC, NMackay
Details

Description Jimmy [MSFT] 2017-01-26 20:46:17 UTC
Created attachment 19501 [details]
repro project

### Overview
The Detail page of a MasterDetailPage will show a navigation bar even when not wrapped in a NavigationPage.


### Steps to Reproduce
1. Run the attached UWP project


### Expected Results
No navigation bar is visible.


### Actual Results 
The navigation bar is visible even though the page is not wrapped in a NavigationPage. I'm not sure if this is an intended change in behavior than previously. 


### Regression Status
2.3.4-pre1: BAD
2.3.3.180:  BAD
2.3.3.175:  BAD
2.3.3.168:  GOOD
2.3.2.127:  GOOD
Comment 1 Jimmy [MSFT] 2017-02-27 19:03:39 UTC
See: https://github.com/xamarin/Xamarin.Forms/pull/744
Comment 2 NMackay 2017-03-06 16:22:50 UTC
Created attachment 20155 [details]
Reproduces UWP toolbar issue in Forms Prism app

This repo shows that toolbar items are hidden in UWP if a content page is wrapped in a masterdetail & navigation page.

Unfortunately this scenario is very common for a lot of apps including Prism Forms app so this issue will affect a lot of apps if you ship 2.3.4 with this issue.
Comment 3 NMackay 2017-03-06 16:35:55 UTC
To test (use the following navigation URI's in app.xaml.cs)

Works
NavigationService.NavigateAsync("app:///AppNavigationPage/MainPage?title=Hello%20from%20Xamarin.Forms");


Fails
NavigationService.NavigateAsync("app:///AppMasterDetailPage/AppNavigationPage/MainPage?title=Hello%20from%20Xamarin.Forms");
Comment 4 Samantha Houts [MSFT] 2017-03-06 22:28:31 UTC
Should be fixed in 2.3.4-pre3. Thank you!
Comment 5 NMackay 2017-03-07 00:07:36 UTC
Thank you to the team for looking at this.
Comment 6 Rui Marinho 2017-03-10 15:33:39 UTC
Sorry the fix is in 2.3.4-pre4
Comment 7 NMackay 2017-03-14 10:06:20 UTC
Fix does not resolve my issue at all. Tested pre-4 on a Nokia 650 handset. Build with SDK 10586 (.NET Core.UWP 5.2.2)

Can someone please help with this.
Comment 8 NMackay 2017-03-14 10:52:58 UTC
Also tested with SDK 14393, no change.

Could someone look at the repo I attached on the 6th March and my comments on the 6th to show how to reproduce this issue.

Thanks.
Comment 9 Rui Marinho 2017-03-14 15:28:31 UTC
NMackay are you saying this doesn't work? Seems working for me.

   var masterPage = new ContentPage { Title = "master" };
   var detailPage = new ContentPage { Title = "detail" };
   detailPage.ToolbarItems.Add(new ToolbarItem() { Text = "one" });
   var mdp = new MasterDetailPage();
   mdp.Master = masterPage;
   mdp.Detail = new NavigationPage(detailPage);
Comment 10 NMackay 2017-03-14 15:30:29 UTC
Hi Rui,

Could you try the sample app I attached to the bug? you'll need to upgrade it to 2.3.4-pre4 from pre2.

The sample app works fine for toolbar items in 2.3.3.193
Comment 11 Jimmy [MSFT] 2017-03-14 15:34:53 UTC
I ran the Prism sample from comment 2 with 2.3.4-pre4 and I am seeing the toolbar item on the page. Is it not working only on the 650 device or also on an emulator?
Comment 12 NMackay 2017-03-14 15:36:27 UTC
HI Jimmy,

It's not working on the device, I don't use any emulator due to DNS issues with the VS emulators in out domain.
Comment 13 Rui Marinho 2017-03-14 15:44:27 UTC
Nah.. it doesn't show here running on desktop mode, but it does work on master. The problema is on mobile or desktop version?
Comment 14 Rui Marinho 2017-03-14 15:45:38 UTC
NMackay also we need to reproduce this without prismo, but i think the code i posted abvoe is what you pretend.
Comment 15 NMackay 2017-03-14 16:04:09 UTC
@Rui

I've upgraded the repo to 2.3.4-pre4 and tested on the nokia with SDK 10586 and anniversary and it works fine as you say.

My main app with is the exact same components/SDK (same code for image selection etc) won't show the toolbaritems in any page.

This is torture.
Comment 16 NMackay 2017-03-14 16:04:54 UTC
Just mobile, I'm not targetting desktop
Comment 17 NMackay 2017-03-14 16:09:52 UTC
I'll remove all nugets completely for all PCLs and platform specific and re-add (13 projects but worth a go)
Comment 18 NMackay 2017-03-14 16:28:50 UTC
Rui & Jimmy

Happy days, removing all nugets from the solution, cleaning,re-adding seems to have done the trick. I did notice pre2 was still hanging about.

Modal toolbar & master detail toolbars now work totally as expected including moving to the top using platform specifics.

Great job.

Thanks.
Comment 19 Rui Marinho 2017-03-14 19:38:40 UTC
Awesome!

Note You need to log in before you can comment on or make changes to this bug.