From 80e5482487f8a37d89b620f54f4ff3c12bcc5b83 Mon Sep 17 00:00:00 2001 From: adrianknight89 Date: Thu, 2 Feb 2017 09:35:23 -0600 Subject: [PATCH] [Core] Added RootPage to NavigationPage (#464) * d * removed whitespace * Using ArgumentNullException * changes --- Xamarin.Forms.Core/NavigationPage.cs | 6 ++++ .../Xamarin.Forms/NavigationPage.xml | 36 ++++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/Xamarin.Forms.Core/NavigationPage.cs b/Xamarin.Forms.Core/NavigationPage.cs index f20a617..a199670 100644 --- a/Xamarin.Forms.Core/NavigationPage.cs +++ b/Xamarin.Forms.Core/NavigationPage.cs @@ -312,6 +312,9 @@ namespace Xamarin.Forms if (index == 0) RootPage = page; + if (index == 0) + RootPage = page; + // Shouldn't be required? if (Width > 0 && Height > 0) ForceLayout(); @@ -370,6 +373,9 @@ namespace Xamarin.Forms if (InternalChildren.Count == 1) RootPage = page; + if (PageController.InternalChildren.Count == 1) + RootPage = page; + CurrentPage = page; } diff --git a/docs/Xamarin.Forms.Core/Xamarin.Forms/NavigationPage.xml b/docs/Xamarin.Forms.Core/Xamarin.Forms/NavigationPage.xml index 31d3543..fca4c27 100644 --- a/docs/Xamarin.Forms.Core/Xamarin.Forms/NavigationPage.xml +++ b/docs/Xamarin.Forms.Core/Xamarin.Forms/NavigationPage.xml @@ -226,6 +226,42 @@ + + + + Property + + 2.0.0.0 + + + Xamarin.Forms.Page + + + + The that is the root of the navigation stack. + + To be added. + To be added. + + + + + + Field + + 2.0.0.0 + + + Xamarin.Forms.BindableProperty + + + + Identifies the property. + + + + + -- 2.7.4