public RootPage() { MenuPage = new MenuPage(); MenuPage.OnMenuSelected += (menuItem) => NavigateToMenu(menuItem); MenuPage.IsEnabled = false; Master = MenuPage; var page = new ScanPage(); LoadSettings(page); Detail = new NavigationPage(new ContentPage { Content = new Grid { Children = { new ActivityIndicator { IsRunning = true } } } }); NavigationPage.SetHasNavigationBar(Detail, false); }
async void LoadSettings(ScanPage page) { await Globals.Settings.Read(); Globals.Settings.ChangAndRebuild(); var useSettings = Globals.Settings.Items.FirstOrDefault((s) => s.Default); if (useSettings == null && Globals.Settings.Items.Count > 0) { useSettings = Globals.Settings.Items[0]; useSettings.Default = true; Globals.Settings.Write(); } page.CurrentSettingValues = useSettings; Detail = new NavigationPage(page); NavigationPage.SetHasNavigationBar(Detail, true); }
public RootPage() { MenuPage = new MenuPage(); MenuPage.OnMenuSelected += (menuItem) => NavigateToMenu(menuItem); MenuPage.IsEnabled = false; Master = MenuPage; var page = new ScanPage(); LoadSettings(page); Detail = new NavigationPage(new ContentPage { Content= new Grid { Children= { new ActivityIndicator{ IsRunning= true } } } }); NavigationPage.SetHasNavigationBar(Detail, false); }