Bug 53791 - [UWP] MasterPage shown when page is pushed on Detail Page navigation
Summary: [UWP] MasterPage shown when page is pushed on Detail Page navigation
Status: RESOLVED ANSWERED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.3
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jimmy [MSFT]
URL:
Depends on:
Blocks:
 
Reported: 2017-03-22 16:11 UTC by Novak Savic
Modified: 2017-03-23 13:42 UTC (History)
3 users (show)

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


Attachments
Reproduction example (234.53 KB, application/x-zip-compressed)
2017-03-22 16:11 UTC, Novak Savic
Details
MasterDetail @Android (36.72 KB, image/png)
2017-03-23 06:42 UTC, Novak Savic
Details
MasterDetail @iOS (42.83 KB, image/png)
2017-03-23 06:42 UTC, Novak Savic
Details
MasterDetail @UWP (63.48 KB, image/png)
2017-03-23 06:42 UTC, Novak Savic
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:
RESOLVED ANSWERED

Description Novak Savic 2017-03-22 16:11:03 UTC
Created attachment 20686 [details]
Reproduction example

I noticed inconsistent behavior across platforms when using MasterDetailPage and when another page is pushed from some of detail pages. My project is more complex, containing custom navigation service etc, so its much easier to share this simple example

Current.MainPage = new MasterDetailPage
{
    Master = new Page { Title = "Menu" },
    Detail = new NavigationPage(new SimplePage())
};

SimplePage has button with command handler to open another page:
await (App.Current.MainPage as MasterDetailPage).Detail.Navigation.PushAsync(new AnotherSimplePage());

On Android and iOS platforms, when another page is pushed on Navigation of Detail page, Master Page is hidden and on the top right corner navigation back button appears which lead back to Detail page. This is right behavior by my opinion. 

On UWP, when another page is pushed on Navigation of Detail page, Master Page is shown, which is wrong.


Solution that contains reproduction is attached.
Comment 1 Jimmy [MSFT] 2017-03-22 18:47:32 UTC
Thank you for filing this report! Let me run the project you attached to see if I can confirm this issue and I will update the report with my results.
Comment 2 Paul DiPietro [MSFT] 2017-03-22 19:00:41 UTC
Please pardon my asking but it seems like you may have to elaborate on your intentions here as the provided reproduction does not do what you're describing. When navigating between the pages using the button(s), the page is hidden at all times in Popover mode and shown at all times in Split mode on the desktop, nor does the popover automatically open on a phone when navigating.

Can you please clarify this and adjust your reproduction if necessary? This might be irrelevant but what version of Windows is presently running, and which device(s) are you using that are experiencing this issue?
Comment 3 Novak Savic 2017-03-23 06:42:09 UTC
Created attachment 20714 [details]
MasterDetail @Android
Comment 4 Novak Savic 2017-03-23 06:42:27 UTC
Created attachment 20715 [details]
MasterDetail @iOS
Comment 5 Novak Savic 2017-03-23 06:42:43 UTC
Created attachment 20716 [details]
MasterDetail @UWP
Comment 6 Novak Savic 2017-03-23 06:45:33 UTC
If you take closer look, on Android and iOS, as soon as another page is pushed on navigation stack, there is no more "Master-Hamburger" icon in the left upper corner, instead there is back button. On UWP, there is still "Master-Hamburger" icon, not back button.

So, behavior is not the same.

Please see pictures attached.
Comment 7 Paul DiPietro [MSFT] 2017-03-23 13:36:51 UTC
As far as I am aware, this is expected behavior, as on the phone the software back button exists and returns you to the last page you were on (in this case, the original ContentPage inside the navigation page), while the desktop version of the app provides a back button in the top left corner of the window itself to indicate that you can do so. The SplitView used is merely a pane for showing the master options opposed to affecting any sort of navigation. There are cases where there can be small differences in behavior between the platforms as the goal is to respect their regular behavior as much as possible.
Comment 8 Novak Savic 2017-03-23 13:42:28 UTC
Ok, I understand motivation. 

If this is targeted behavior, and you do not plan to align this behavior with other platforms, we can close this issue.