public Page CreateDefaultMainPage() { var layout = new StackLayout { BackgroundColor = Color.Red }; layout.Children.Add(new Label { Text = "This is master Page" }); var master = new ContentPage { Title = "Master", Content = layout, BackgroundColor = Color.SkyBlue, Icon = "menuIcon" }; master.On <iOS>().SetUseSafeArea(true); var mdp = new MasterDetailPage { AutomationId = DefaultMainPageId, Master = master, Detail = CoreGallery.GetMainPage() }; master.Icon.AutomationId = "btnMDPAutomationID"; mdp.SetAutomationPropertiesName("Main page"); mdp.SetAutomationPropertiesHelpText("Main page help text"); mdp.Master.Icon.SetAutomationPropertiesHelpText("This as MDP icon"); mdp.Master.Icon.SetAutomationPropertiesName("MDPICON"); return(mdp); }
public App() { _testCloudService = DependencyService.Get <ITestCloudService>(); InitInsights(); MainPage = new MasterDetailPage { Master = new ContentPage { Title = "Master", BackgroundColor = Color.Red }, Detail = CoreGallery.GetMainPage() }; //// Uncomment to verify that there is no gray screen displayed between the blue splash and red MasterDetailPage. //MainPage = new Bugzilla44596SplashPage(() => //{ // var newTabbedPage = new TabbedPage(); // newTabbedPage.Children.Add(new ContentPage { BackgroundColor = Color.Red, Content = new Label { Text = "yay" } }); // MainPage = new MasterDetailPage // { // Master = new ContentPage { Title = "Master", BackgroundColor = Color.Red }, // Detail = newTabbedPage // }; //}); }
public Page CreateDefaultMainPage() { return(new MasterDetailPage { AutomationId = DefaultMainPageId, Master = new ContentPage { Title = "Master", BackgroundColor = Color.Red }, Detail = CoreGallery.GetMainPage() }); }
public App() { _testCloudService = DependencyService.Get <ITestCloudService>(); InitInsights(); MainPage = new MasterDetailPage { Master = new ContentPage { Title = "Master", BackgroundColor = Color.Red }, Detail = CoreGallery.GetMainPage() }; }
public Page CreateDefaultMainPage() { var layout = new StackLayout { BackgroundColor = Color.Red }; layout.Children.Add(new Label { Text = "This is master Page" }); var master = new ContentPage { Title = "Master", Content = layout, BackgroundColor = Color.SkyBlue }; master.On <iOS>().SetUseSafeArea(true); return(new MasterDetailPage { AutomationId = DefaultMainPageId, Master = master, Detail = CoreGallery.GetMainPage() }); }
public Page CreateDefaultMainPage() { var layout = new StackLayout { BackgroundColor = Color.Red }; layout.Children.Add(new Label { Text = "This is master Page" }); var master = new ContentPage { Title = "Master", Content = layout, BackgroundColor = Color.SkyBlue }; master.On <iOS>().SetUseSafeArea(true); //return new MasterDetailPage //{ // AutomationId = DefaultMainPageId, // Master = master, // Detail = CoreGallery.GetMainPage() //}; // TODO: Implement MDP on Skia, before re-enabling return(CoreGallery.GetMainPage()); }
public SwapHierachyStackLayout(string heirarchy) { AutomationId = "ChoosePageScrollView"; BackgroundColor = Color.Blue; var buttons = new[] { new SwapRootButton("Content", new Command(() => Application.Current.MainPage = new RootContentPage("Content"))), new SwapRootButton("Nav->Content", new Command(() => Application.Current.MainPage = new RootNavigationContentPage("Nav->Content"))), new SwapRootButton("MDP->Nav->Content", new Command(() => Application.Current.MainPage = new RootMDPNavigationContentPage("MDP->Nav->Content"))), new SwapRootButton("Tab->Content", new Command(() => Application.Current.MainPage = new RootTabbedContentPage("Tab->Content"))), new SwapRootButton("Tab->MDP->Nav->Content", new Command(() => Application.Current.MainPage = new RootTabbedMDPNavigationContentPage("Tab->MDP->Nav->Content"))), new SwapRootButton("Tab->Nav->Content", new Command(() => Application.Current.MainPage = new RootTabbedNavigationContentPage("Tab->Nav->Content"))), new SwapRootButton("Tab(Many)->Nav->Content", new Command(() => Application.Current.MainPage = new RootTabbedManyNavigationContentPage("Tab(Many)->Nav->Content"))), // tsk tsk new SwapRootButton("Nav->Tab->Content(BAD IDEA)", new Command(() => Application.Current.MainPage = new RootNavigationTabbedContentPage("Nav->Tab->Content(BAD IDEA)"))), new SwapRootButton("Nav->Tab(Many)->Content(BAD IDEA)", new Command(() => Application.Current.MainPage = new RootNavigationManyTabbedPage("Nav->Tab(Many)->Content(BAD IDEA)"))), new SwapRootButton("MDP->Nav->Tab->Content(BAD IDEA)", new Command(() => Application.Current.MainPage = new RootMDPNavigationTabbedContentPage("MDP->Nav->Tab->Content(BAD IDEA)"))), // modals new SwapRootButton("(Modal)Content", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootContentPage("(Modal)Content")))), new SwapRootButton("(Modal)Nav->Content", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootNavigationContentPage("(Modal)Nav->Content")))), new SwapRootButton("(Modal)MDP->Nav->Content", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootMDPNavigationContentPage("(Modal)MDP->Nav->Content")))), new SwapRootButton("(Modal)Tab->Content", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootTabbedContentPage("(Modal)Tab->Content")))), new SwapRootButton("(Modal)Tab->MDP->Nav->Content", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootTabbedMDPNavigationContentPage("(Modal)Tab->MDP->Nav->Content")))), new SwapRootButton("(Modal)Tab->Nav->Content", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootTabbedNavigationContentPage("(Modal)Tab->Nav->Content")))), new SwapRootButton("(Modal)Tab(Many)->Nav->Content", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootTabbedManyNavigationContentPage("(Modal)Tab(Many)->Nav->Content")))), // tsk tsk new SwapRootButton("(Modal)Nav->Tab->Content(BAD IDEA)", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootNavigationTabbedContentPage("(Modal)Nav->Tab->Content(BAD IDEA)")))), new SwapRootButton("(Modal)Nav->Tab(Many)->Content(BAD IDEA)", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootNavigationManyTabbedPage("(Modal)Nav->Tab(Many)->Content(BAD IDEA)")))), new SwapRootButton("(Modal)MDP->Nav->Tab->Content(BAD IDEA)", new Command(async() => await Application.Current.MainPage.Navigation.PushModalAsync(new RootMDPNavigationTabbedContentPage("(Modal)MDP->Nav->Tab->Content(BAD IDEA)")))), new SwapRootButton("(Modal)CoreGallery", new Command(() => Application.Current.MainPage = CoreGallery.GetMainPage())) }; var layout = new StackLayout(); layout.Children.Add(new Label { Text = heirarchy }); foreach (var button in buttons) { layout.Children.Add(button); } Content = layout; }