// Preform different operations to return to SingleSelectPage and UnplacedPage for IOS/Android. private void ReturnToBasePage(IMainPage page) { if (Device.RuntimePlatform == Device.iOS) { ((IMainPage)currentPageContainer).SetLayout(page.GetLayout()); currentPageContainer.BackgroundColor = ContentManager.ThemeColor; currentPageContainer.Content.AddEffect(new SafeAreaPadding()); resizeIconAction?.Invoke(); } else// No work { Console.WriteLine("Page Controller 322 Root Overwritten"); ContentManager.SetNativeViewFunction(this); // currentPageContainer.Content = null; ((IMainPage)currentPageContainer).SetLayout(page.GetLayout()); /* * * var index = Children.IndexOf(currentPageContainer); * Children.Remove(currentPageContainer); * currentPageContainer = (ContentPage)page; * currentPageContainer.Content = page.GetLayout(); * currentPageContent = page.GetLayout(); * Children.Insert(index, currentPageContainer); * CurrentPage = currentPageContainer; * navigationStack.Add((ContentPage)page, new List<string>()); * navigationParams.Add((ContentPage)page, new List<List<object>>());*/ } }