private void NavView_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args) { ContentFrame.Navigate(typeof(HomePage)); }
private void StoichiometryButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Atomic.App.Pages.StoichiometryPage)); }
private void IdealGasButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Atomic.App.Pages.IdealGasPage)); }
private void NavView_Loaded(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(OrderPage)); }
private void TableButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Atomic.App.Pages.PeriodicTablePage)); }
private void BtnSetting_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(SettingsPage), null, App.FromRightTransitionInfo); }
/// <summary> /// Navigates to a page. Depends on the Name attribute of the Button control /// Expects : Button Tag attribute to be the page name to navigate to, if page is in a folder then /// folderName.pageName e.g View.AddUser where View is the folder and AddUser is the xaml page /// Expects : Frame Name attribute to be ContentFrame /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ClickHandler(object sender, RoutedEventArgs e) { //Exception is not handled deliberately.so the developer will be reminded to set control's Name attribute ContentFrame.Navigate(Type.GetType($"{Application.Current.GetType().Namespace}.{(sender as Button).Tag}")); }
public MainWindow() { InitializeComponent(); ContentFrame.Navigate(new ViewerPage(this)); ContentFrame.Focus(); }
private void TestView_BackRequested(object sender, BackRequestedEventArgs e) { if (ContentFrame.CanGoBack) { e.Handled = true; ContentFrame.GoBack(); if (ContentFrame.Content.ToString() == "App2.MainDiary") { radioButton1.IsChecked = true; radioButton1.Background = new SolidColorBrush(Colors.Red); radioButton2.Background = new SolidColorBrush(Colors.Transparent); radioButton3.Background = new SolidColorBrush(Colors.Transparent); radioButton4.Background = new SolidColorBrush(Colors.Transparent); } if (ContentFrame.Content.ToString() == "App2.MapPage") { radioButton3.IsChecked = true; radioButton3.Background = new SolidColorBrush(Colors.Red); radioButton2.Background = new SolidColorBrush(Colors.Transparent); radioButton1.Background = new SolidColorBrush(Colors.Transparent); radioButton4.Background = new SolidColorBrush(Colors.Transparent); } if (ContentFrame.Content.ToString() == "App2.RoutePage") { radioButton4.IsChecked = true; radioButton4.Background = new SolidColorBrush(Colors.Red); radioButton2.Background = new SolidColorBrush(Colors.Transparent); radioButton1.Background = new SolidColorBrush(Colors.Transparent); radioButton3.Background = new SolidColorBrush(Colors.Transparent); } if (ContentFrame.Content.ToString() == "App2.InvertoryMain") { radioButton2.IsChecked = true; radioButton2.Background = new SolidColorBrush(Colors.Red); radioButton4.Background = new SolidColorBrush(Colors.Transparent); radioButton1.Background = new SolidColorBrush(Colors.Transparent); radioButton3.Background = new SolidColorBrush(Colors.Transparent); } if (ContentFrame.Content.ToString() == "App2.FieldInvertoryItem") { radioButton2.IsChecked = true; radioButton2.Background = new SolidColorBrush(Colors.Red); radioButton4.Background = new SolidColorBrush(Colors.Transparent); radioButton1.Background = new SolidColorBrush(Colors.Transparent); radioButton3.Background = new SolidColorBrush(Colors.Transparent); } if (ContentFrame.Content.ToString() == "App2.CreateInvert") { radioButton2.IsChecked = true; radioButton2.Background = new SolidColorBrush(Colors.Red); radioButton4.Background = new SolidColorBrush(Colors.Transparent); radioButton1.Background = new SolidColorBrush(Colors.Transparent); radioButton3.Background = new SolidColorBrush(Colors.Transparent); } if (ContentFrame.Content.ToString() == "App2.FieldInvert") { radioButton2.IsChecked = true; radioButton2.Background = new SolidColorBrush(Colors.Red); radioButton4.Background = new SolidColorBrush(Colors.Transparent); radioButton1.Background = new SolidColorBrush(Colors.Transparent); radioButton3.Background = new SolidColorBrush(Colors.Transparent); } if (ContentFrame.Content.ToString() == "App2.OpenInvertory") { radioButton2.IsChecked = true; radioButton2.Background = new SolidColorBrush(Colors.Red); radioButton4.Background = new SolidColorBrush(Colors.Transparent); radioButton1.Background = new SolidColorBrush(Colors.Transparent); radioButton3.Background = new SolidColorBrush(Colors.Transparent); } } }
private void AboutButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Pages.AboutPage)); }
private void View(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Views.View)); }
private void FavoritesButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Pages.FavoritesPage)); }
private void IngredientButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Pages.SearchIngredientPage)); }
public void Navigate(Type sourcePageType, object parameter) { ContentFrame.Navigate(sourcePageType, parameter); }
private void NavView_Navigate(NavigationViewItem item) { if (item != null) { switch (item.Tag) { case "today": ContentFrame.Navigate(typeof(DailyReportPage)); NavView.Header = "Mai nap"; break; case "week": ContentFrame.Navigate(typeof(WeeklyReportPage)); NavView.Header = "Heti jelenzés"; break; case "expired": ContentFrame.Navigate(typeof(ExpiredTasksPage)); NavView.Header = "Lejárt feladatok"; break; case "Checklist": ContentFrame.Navigate(typeof(SingleCategoryPage)); NavView.Header = item.Content; if (ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()) != null) { ViewModel.SelectedCategory = ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()); } break; case "MultiChecklist": ContentFrame.Navigate(typeof(MultiCheckListPage)); NavView.Header = item.Content; if (ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()) != null) { ViewModel.SelectedCategory = ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()); } break; case "Kanban3": ContentFrame.Navigate(typeof(KanbanPage)); NavView.Header = item.Content; if (ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()) != null) { ViewModel.SelectedCategory = ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()); } break; case "Kanban5": ContentFrame.Navigate(typeof(KanbanExtendedPage)); NavView.Header = item.Content; if (ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()) != null) { ViewModel.SelectedCategory = ViewModel.Categories.FirstOrDefault(c => c.Name == item.Content.ToString()); } break; case "addnew": ContentFrame.Navigate(typeof(NewCategoryPage)); NavView.Header = "Kategória hozzáadása"; break; default: ContentFrame.Navigate(typeof(SettingsPage)); NavView.Header = "Beállítások"; break; } } }
public void NavigateTo(Uri uri) { ContentFrame.Navigate(uri); }
protected override async void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); HeaderControl.DataContext = new HeaderInfo(RuntimeData.StudentInfo, RuntimeData.UserId, RuntimeData.Score.GPA); ContentFrame.Navigate(typeof(Home)); try { var channel = await Windows.Networking.PushNotifications. PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync(); await WebClient.PostWnsChannelAsync(RuntimeData.Token, channel.Uri); } catch (Exception ex) { await WebClient.ReportException(ex); } // Reselect campus and reschedule tasks. if (RuntimeData.LaunchState) { RuntimeData.LaunchState = false; if (RuntimeData.LoadSetting("campus", out _) == false) { CampusSelect campusSelect = new CampusSelect(); await campusSelect.ShowAsync(); RuntimeData.LoadSetting("campus", out _); } var tasks = BackgroundTaskRegistration.AllTasks; foreach (var task in tasks) { task.Value.Unregister(true); } BackgroundExecutionManager.RemoveAccess(); var backgroundStatus = await BackgroundExecutionManager.RequestAccessAsync(); if (backgroundStatus == BackgroundAccessStatus.DeniedBySystemPolicy || backgroundStatus == BackgroundAccessStatus.DeniedByUser || backgroundStatus == BackgroundAccessStatus.Unspecified) { return; } var builder = new BackgroundTaskBuilder(); builder.Name = "Hourly Tile Update Task"; builder.SetTrigger(new TimeTrigger(30, false)); builder.AddCondition(new SystemCondition(SystemConditionType.InternetAvailable)); builder.IsNetworkRequested = true; builder.Register(); builder.Name = "Login Tile Update Task"; builder.SetTrigger(new SystemTrigger(SystemTriggerType.UserPresent, false)); builder.Register(); } await ScheduleNotificationUpdateTasks.UpdateTile(RuntimeData.Schedule); }
private void MainPage_Loaded(object sender, RoutedEventArgs e) { this.MainContent.SelectedItem = this.MainContent.MenuItems.First(); ContentFrame.Navigate(typeof(WelcomePage)); }
private void Example1_Loaded(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(SampleStandardSizingPage), null, new SuppressNavigationTransitionInfo()); }
internal void NavigateToColor(string color) { NavViewMenu.Header = ResourceLoader.GetForCurrentView().GetString(color + "NavItem/Content"); ContentFrame.Navigate(typeof(ColorPage), color); }
public ChangelogDialog(Type pageType) { this.InitializeComponent(); ContentFrame.Navigate(pageType); }
private void NavView_BackRequested(NavigationView sender, NavigationViewBackRequestedEventArgs args) { ContentFrame.GoBack(); }
private void Page_Loaded(object sender, RoutedEventArgs e) { this.DataContext = this.ViewModel.warehouse; ContentFrame.Navigate(typeof(GraphsPage), "fast"); }
public MainPage() { this.InitializeComponent(); ContentFrame.Navigate(typeof(LandingPage)); }
private void BalanceButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Atomic.App.Pages.FormulaBalancerPage)); }
//押されたアイテムの処理 private void NavView_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) { if (args.IsSettingsSelected) { //ContentFrame.Navigate(typeof(SettingsPage)); } else { NavigationViewItem item = args.SelectedItem as NavigationViewItem; switch (item.Tag.ToString()) { case "home": ContentFrame.Navigate(typeof(home)); NavView.Header = "ホーム"; break; case "signup": ContentFrame.Navigate(typeof(signin)); NavView.Header = "サインアップ"; break; case "signin": ContentFrame.Navigate(typeof(Signup)); NavView.Header = "サインイン"; break; case "signout": ContentFrame.Navigate(typeof(Page)); NavView.Header = "サインアウト"; break; case "work": ContentFrame.Navigate(typeof(BookmarkList)); //確認用 signin.Visibility = Visibility.Collapsed; signup.Visibility = Visibility.Collapsed; signout.Visibility = Visibility.Visible; NavView.Header = "仕事"; break; case "music": ContentFrame.Navigate(typeof(BookmarkList)); NavView.Header = "音楽"; break; case "enter": ContentFrame.Navigate(typeof(BookmarkList)); NavView.Header = "芸能"; break; case "sport": ContentFrame.Navigate(typeof(BookmarkList)); NavView.Header = "スポーツ"; break; case "fashion": ContentFrame.Navigate(typeof(BookmarkList)); NavView.Header = "ファッション"; break; case "game": ContentFrame.Navigate(typeof(BookmarkList)); NavView.Header = "ゲーム"; break; case "other": ContentFrame.Navigate(typeof(BookmarkList)); NavView.Header = "その他"; break; } } }
private void EmpiricalFormulaButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Atomic.App.Pages.EmpiricalFormulaPage)); }
protected override void OnNavigatedTo(NavigationEventArgs e) { ContentFrame.Navigate(typeof(BlankPage1)); }
private void LimitingReagentButton_Click(object sender, RoutedEventArgs e) { ContentFrame.Navigate(typeof(Atomic.App.Pages.LimitingReagentPage)); }
public bool NavigateTo(Type sourcePageType) { return(ContentFrame.Navigate(typeof(PumpsPage))); }