public void showAnaPage() { NavFrame.Dispatcher.Invoke((Action)(() => { AnalysPage = new AnalysePage(this); NavFrame.Navigate(AnalysPage); })); }
private void NavView_OnSelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) { if (args.IsSettingsSelected) { NavFrame.Navigate(typeof(SettingsPage)); } else { var selectedItem = (args.SelectedItem as NavigationViewItem)?.Content; switch (selectedItem) { case "Home": NavFrame.Navigate(typeof(GalleryPage)); break; case "Dates": NavFrame.Navigate(typeof(DatesPage)); break; case "Places": NavFrame.Navigate(typeof(PlacesPage)); break; case "Tags": NavFrame.Navigate(typeof(TagsPage)); break; default: Debug.WriteLine("NotImplementedException: " + selectedItem); break; } } }
public void showIDInputPage(char channel) { NavFrame.Navigate(idInputPage); idInputPage.Channel = channel; idInputPage.chan1patientID.Text = ""; idInputPage.chan1materID.Text = ""; }
public MainWindow() { InitializeComponent(); SizeToContent = SizeToContent.WidthAndHeight; ResizeMode = ResizeMode.NoResize; NavFrame.NavigationUIVisibility = NavigationUIVisibility.Hidden; NavFrame.Navigate(new ProyectoOracle.Vistas.Menu(this)); }
public MainPage() { this.InitializeComponent(); //NavFrame.Navigate(typeof(RestCall)); //NavFrame.Navigate(typeof(LocalData)); //NavFrame.Navigate(typeof(Threading)); NavFrame.Navigate(typeof(SqliteConnection)); }
private void AutoSuggestBox_OnQuerySubmitted(AutoSuggestBox sender, AutoSuggestBoxQuerySubmittedEventArgs args) { var queryStr = sender.Text; if (queryStr != "" && queryStr != "No results") { NavFrame.Navigate(typeof(SearchPage), queryStr); } }
public Recon() { //this loads the mainpage and the whole appliation from there InitializeComponent(); NavFrame.Navigate(new MainPage()); //////////////////////////////////////// /// /// } /// Do not delete this! ///
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { HelixGenModel theModel = ((HelixGen.App)(App.Current)).Model; theModel.initializationProgress += TheModel_initializationProgress; // Show the version. Version thisVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version; tbVersion.Text = string.Format("CopyRight To Helixgen,Version: {0}.{1}", thisVersion.Major.ToString(), thisVersion.Minor.ToString()); // showMainPage(); //AnalysPage = new AnalysePage(this); startupPage = new StartupPage(theModel); setUpPage = new setUp(this); idInputPage = new IDInput(this); Loginpage = new loginPage(this); AnalysPage = new AnalysePage(this); runResultPage = new RunResultPage(this); //_mainPage = new MainPage(this); NavFrame.Navigate(Loginpage); /* * StartupPage startupPage = new StartupPage(theModel); * * NavFrame.Navigate(startupPage); * Thread.Sleep(0); * * NavFrame.LoadCompleted += NavFrame_Startup_Navigated; */ #if false OpticsControlPage opticsPage = new OpticsControlPage(); NavFrame.Navigate(opticsPage); opticsPage.Initialize(); #endif #if false Thread.Sleep(10000); Task.Factory.StartNew(() => { Application.Current.Dispatcher.Invoke( delegate { showMainPage(); } ); } ); #endif }
public void Startup() { HelixGenModel theModel = ((HelixGen.App)(App.Current)).Model; theModel.initializationProgress += TheModel_initializationProgress; NavFrame.Navigate(startupPage); Thread.Sleep(0); NavFrame.LoadCompleted += NavFrame_Startup_Navigated; }
public void navigateTo(Type pageType, Object payload = null) { if (NavFrame.BackStack.Count > 0) { NavFrame.BackStack.RemoveAt(0); } if (payload == null) { NavFrame.Navigate(pageType); return; } NavFrame.Navigate(pageType, payload); }
public MainWindow() { Contexto = new ContextoServicio(UrlFox); Sesion = new Sesion(); InitializeComponent(); SizeToContent = SizeToContent.WidthAndHeight; ResizeMode = ResizeMode.NoResize; NavFrame.NavigationUIVisibility = NavigationUIVisibility.Hidden; NavFrame.Navigate(new InicioSesion(this)); }
private async Task NavigateWithTransition(Type sourcePageType, object parameter) { if (_categorySelectorView != null) { _ = HideCategorySelector(); } if (_purchaseView != null) { _ = HidePurchaseForm(); } if (NavFrame.Content is IExitTransition page) { await page.PlayExitTransition(); } NavFrame.Navigate(sourcePageType, parameter, new SuppressNavigationTransitionInfo()); }
private void LightCommandsButton_Click(object sender, RoutedEventArgs e) { NavFrame.Navigate(typeof(LightCommandsPage)); }
private void RegisterButton_Click(object sender, RoutedEventArgs e) { NavFrame.Navigate(typeof(RegisterPage)); }
private void FindLightsButton_Click(object sender, RoutedEventArgs e) { NavFrame.Navigate(typeof(FindLightsPage)); }
/* * public void showMainPage() * { * // Sleep for a short while. * * * NavFrame.Navigate(new MainPage(this)); * } */ public void showSetUpPage() { NavFrame.Navigate(setUpPage); }
private void LocateBridgeButton_Click(object sender, RoutedEventArgs e) { NavFrame.Navigate(typeof(LocateBridgePage)); }
private async void MainPage_Loaded(object sender, RoutedEventArgs e) { try { _ = await StorageFolder.GetFolderFromPathAsync("C:\\"); } catch (UnauthorizedAccessException) { ContentDialog Dialog = new ContentDialog { Title = "提示", Content = "请开启此应用的文件系统访问权限以正常工作\r\r然后重新启动该应用", PrimaryButtonText = "导航至权限页", CloseButtonText = "关闭应用", Background = Application.Current.Resources["DialogAcrylicBrush"] as Brush }; switch (await Dialog.ShowAsync()) { case ContentDialogResult.Primary: await Launcher.LaunchUriAsync(new Uri("ms-settings:appsfeatures-app")); ToastContent Content = new ToastContent() { Scenario = ToastScenario.Reminder, Visual = new ToastVisual() { BindingGeneric = new ToastBindingGeneric() { Children = { new AdaptiveText() { Text = "正在等待用户完成操作..." }, new AdaptiveText() { Text = "请开启文件系统权限" }, new AdaptiveText() { Text = "随后点击下方的立即启动" } } } }, Actions = new ToastActionsCustom { Buttons = { new ToastButton("立即启动", "Restart") { ActivationType = ToastActivationType.Foreground }, new ToastButtonDismiss("稍后") } } }; ToastNotificationManager.CreateToastNotifier().Show(new ToastNotification(Content.GetXml())); Application.Current.Exit(); break; default: Application.Current.Exit(); break; } return; } var View = ApplicationView.GetForCurrentView(); if (ApplicationData.Current.LocalSettings.Values["EnableScreenCapture"] is bool Enable) { View.IsScreenCaptureEnabled = Enable; } else { View.IsScreenCaptureEnabled = false; ApplicationData.Current.LocalSettings.Values["EnableScreenCapture"] = false; } if (ApplicationData.Current.LocalSettings.Values["EmailProtectionMode"] == null && await KeyCredentialManager.IsSupportedAsync()) { ApplicationData.Current.LocalSettings.Values["EmailProtectionMode"] = true; } if (ApplicationData.Current.LocalSettings.Values["UseInsideWebBrowser"] == null) { ApplicationData.Current.LocalSettings.Values["UseInsideWebBrowser"] = true; } PageDictionary = new Dictionary <Type, string>() { { typeof(HomePage), "首页" }, { typeof(MusicPage), "音乐" }, { typeof(VoiceRec), "语音识别" }, { typeof(WebTab), "网页浏览" }, { typeof(Cosmetics), "智能美妆" }, { typeof(About), "关于" }, { typeof(ChangeLog), "关于" }, { typeof(USBControl), "USB管理" }, { typeof(EmailPage), "邮件" }, { typeof(CodeScanner), "QR识别" } }; if (ApplicationData.Current.LocalSettings.Values["USBActivateRequest"] is bool IsUSB && IsUSB) { ApplicationData.Current.LocalSettings.Values["USBActivateRequest"] = null; NavigationView.SelectedItem = NavigationView.MenuItems[5] as NavigationViewItemBase; NavFrame.Navigate(typeof(USBControl), NavFrame); }
private void ParallaxButton_Click_1(object sender, RoutedEventArgs e) { NavFrame.Navigate(typeof(ParallaxPage)); }
/// <summary> /// Invoked when this page is about to be displayed in a Frame. /// </summary> /// <param name="e">Event data that describes how this page was reached. The Parameter /// property is typically used to configure the page.</param> protected override void OnNavigatedTo(NavigationEventArgs e) { NavFrame.Navigate(typeof(FindingBridgePage)); }
private void UtilButton_Click_1(object sender, RoutedEventArgs e) { NavFrame.Navigate(typeof(UtilExamplePage)); }
public void showRunResultPage() { NavFrame.Navigate(_mainPage); }
public void showOpticsPage() { NavFrame.Navigate(new OpticsControlPage()); }
public void showRunResultPage1() { NavFrame.Navigate(runResultPage); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); NavFrame.Navigate(typeof(ScheduleList)); }
public MainPage() { InitializeComponent(); NavigationViewControl.SelectedItem = NavigationViewControl.MenuItems[0]; NavFrame.Navigate(typeof(StronglyTypedSamplePage), null); }
private void EntertainmentButton_Click(object sender, RoutedEventArgs e) { NavFrame.Navigate(typeof(EntertainmentSetup)); }
private void ControlsButton_Click_1(object sender, RoutedEventArgs e) { NavFrame.Navigate(typeof(ControlsExamplePage)); }
public void GoTo(Page pagina) { NavFrame.Navigate(pagina); }
private void NavigationViewControl_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args) { if (args.InvokedItemContainer?.Tag != null) { var navItemTag = args.InvokedItemContainer.Tag.ToString(); switch (navItemTag) { case "StronglyTyped": { NavFrame.Navigate(typeof(StronglyTypedSamplePage), null, args.RecommendedNavigationTransitionInfo); } break; case "StringFormat": { NavFrame.Navigate(typeof(StringFormatSamplePage), null, args.RecommendedNavigationTransitionInfo); } break; case "LiteralFormat": { NavFrame.Navigate(typeof(LiteralStringFormatSamplePage), null, args.RecommendedNavigationTransitionInfo); break; } case "StringReferenceFormat": { NavFrame.Navigate(typeof(ReferenceStringFormatSamplePage), null, args.RecommendedNavigationTransitionInfo); break; } case "MacroFormat": { NavFrame.Navigate(typeof(MacroSamplePage), null, args.RecommendedNavigationTransitionInfo); break; } case "NamedStringFormat": { NavFrame.Navigate(typeof(NamedStringFormatSamplePage), null, args.RecommendedNavigationTransitionInfo); } break; case "Pluralization": { NavFrame.Navigate(typeof(BasicPluralizationSamplePage), null, args.RecommendedNavigationTransitionInfo); } break; case "AdvancedPluralization": { NavFrame.Navigate(typeof(AdvancedPluralizationSamplePage), null, args.RecommendedNavigationTransitionInfo); } break; case "Variants": { NavFrame.Navigate(typeof(VariantsSamplePage), null, args.RecommendedNavigationTransitionInfo); } break; case "HtmlText": { NavFrame.Navigate(typeof(HtmlStringSamplePage), null, args.RecommendedNavigationTransitionInfo); } break; } } }