Bug 51508 - ContentPage as Master of MasterDetailPage doesn't fill page
Summary: ContentPage as Master of MasterDetailPage doesn't fill page
Status: CONFIRMED
Alias: None
Product: Forms
Classification: Xamarin
Component: Windows ()
Version: 2.3.5
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-01-13 13:56 UTC by Christian Schwarz
Modified: 2017-06-27 14:21 UTC (History)
6 users (show)

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


Attachments
Reproduction (362.13 KB, application/x-zip-compressed)
2017-01-13 13:56 UTC, Christian Schwarz
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 for Bug 51508 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 Christian Schwarz 2017-01-13 13:56:25 UTC
Created attachment 19324 [details]
Reproduction

Page masterContent = new ContentPage() { Title = "Master", BackgroundColor = Color.Red, Content = new BoxView() { BackgroundColor = Color.Green } };
//masterContent = new NavigationPage(masterContent) { Title = "Master" };
Page detailContent = new ContentPage() { BackgroundColor = Color.Blue, Content = new BoxView() { BackgroundColor = Color.Yellow } };

MasterDetailPage masterDetail = new MasterDetailPage()
{
	Master = masterContent,
	Detail = detailContent
};

MainPage = masterDetail;

The red background color shouldn't be visible.

Works fine on Android and iOS.

If you wrap Master in an NavigationPage it works on UWP too.
Comment 2 Christian Schwarz 2017-04-06 19:52:32 UTC
With 2.3.4 release it only happens if Detail has a title set (still an issue).

Page detailContent = new ContentPage() { Title = "Detail", BackgroundColor = Color.Blue, Content = new BoxView() { BackgroundColor = Color.Yellow } };
Comment 3 Chris King 2017-05-04 17:05:56 UTC
All green and yellow on latest master even when detail has a title set.
Comment 4 Christian Schwarz 2017-06-23 18:16:29 UTC
Tested it again with 2.3.4, 2.3.5-pre3 and 2.3.6.113-nightly and it is still happening if detail page has a title set in all tested versions.

MasterDetailPage masterDetail = new MasterDetailPage()
{
     Master = new ContentPage() { Title = "Master", BackgroundColor = Color.Red, Content = new BoxView() { BackgroundColor = Color.Green } },
     Detail = new NavigationPage(new ContentPage() { Title = "Detail" })
};

MainPage = masterDetail;
Comment 5 Paul DiPietro [MSFT] 2017-06-27 14:15:04 UTC
Updating back to confirmed for when using the above code snippet in the repro