/// <summary> /// FileSettingsPage was selected in the menu. /// Navigate to File setting page. /// </summary> private void RadioButton1_Checked(object sender, RoutedEventArgs e) { _ = sender; _ = e; MainContentFrame.Navigate(typeof(FileSettingsPage)); splitView.IsPaneOpen = false; }
private void ToHistoryPage(object sender, RoutedEventArgs e) { if (MainContentFrame != null) { MainContentFrame.Navigate(typeof(Pages.HistoryPage)); } }
private void Page_SizeChanged(object sender, SizeChangedEventArgs e) { if (Config.IsPageSwitched(e.PreviousSize, e.NewSize) && !string.IsNullOrEmpty(ViewModelBase.CurrentStoryId)) { MainContentFrame.Navigate(typeof(MainContentPage)); CommentFrame.Navigate(typeof(CommentPage)); } }
public MainPage() { InitializeComponent(); _translator = new Translator("MainPage"); UtilitiyListBox.SelectedIndex = 0; MainContentFrame.Navigate(typeof(TripPlannerWindow)); }
private void Settings_Tapped(object sender, TappedRoutedEventArgs e) { if (Current_VisualState.Visibility == Visibility.Visible) { SplitView.splitviewPage.MainNav.IsPaneOpen = false; } MainContentFrame.Navigate(typeof(Settings)); }
protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (UIViewSettings.GetForCurrentView().UserInteractionMode == UserInteractionMode.Touch) { Splitter.DisplayMode = SplitViewDisplayMode.Overlay; } MainContentFrame.Navigate(typeof(Pages.ItaListPage)); }
public MainPage() { this.InitializeComponent(); Application.Current.Suspending += (a, e) => (DataContext as MainPageViewModel)?.SerialManager.PortDispose(); this.Loaded += async(a, e) => { await((MainPageViewModel)DataContext).SerialManager.PortInitializeAsync(); MainContentFrame.Navigate(typeof(QuizControl), this.DataContext); }; }
private void PublicRecipe_Checked(object sender, RoutedEventArgs e) { if (Current_VisualState.Visibility == Visibility.Visible) { SplitView.splitviewPage.MainNav.IsPaneOpen = false; } MainContentFrame.Navigate(typeof(LoadAnimation)); PublicButton.IsChecked = true; }
private void ShoppingList_Checked(object sender, RoutedEventArgs e) { if (Current_VisualState.Visibility == Visibility.Visible) { SplitView.splitviewPage.MainNav.IsPaneOpen = false; } MainContentFrame.Navigate(typeof(ShoppingList)); ShoppingButton.IsChecked = true; }
private void DisplayStory(string storyId) { ViewModelBase.CurrentStoryId = storyId; if (Config.UIStatus == AppUIStatus.All || Config.UIStatus == AppUIStatus.ListAndContent) { MainContentFrame.Navigate(typeof(MainContentPage), storyId); CommentFrame.Navigate(typeof(CommentPage), storyId); } else { ((Frame)Window.Current.Content).Navigate(typeof(MainContentPage), storyId); } }
/// <summary> /// Navigates to the desired page, ensuring all old BackStack references to the page are removed /// </summary> /// <param name="type"></param> private void NavigateToPage(Type type) { IEnumerable <PageStackEntry> duplicatePages = MainContentFrame.BackStack.Where(page => page.SourcePageType == type); if (duplicatePages.Count() > 0) { foreach (PageStackEntry page in duplicatePages) { MainContentFrame.BackStack.Remove(page); } } MainContentFrame.Navigate(type, this); }
/// <summary> /// PasswordListPage was selected in the menu. /// If configurations is made up already, navigate to password list page, if not, ignore this event. /// </summary> private async void RadioButton2_Checked(object sender, RoutedEventArgs e) { _ = sender; _ = e; // if it is not initialized, show FileSettingsPage forcly. if (!await AppData.IsInitialized().ConfigureAwait(true)) { MainPageConfiguRadio.IsChecked = true; } else { MainContentFrame.Navigate(typeof(PasswordListPage)); splitView.IsPaneOpen = false; } }
private void DisplayStory(string storyId) { ViewModelBase.CurrentStoryId = storyId; if (Config.UIStatus == AppUIStatus.All || Config.UIStatus == AppUIStatus.ListAndContent) { MainContentFrame.Navigate(typeof(MainContentPage), storyId); CommentFrame.Navigate(typeof(CommentPage), storyId); } else { Frame rootFrame = App.GetWindowFrame(); if (rootFrame == null) { return; } rootFrame.Navigate(typeof(MainContentPage), storyId); } }
private void OnUtilityListBoxChanged(object sender, SelectionChangedEventArgs e) { if (TripPlannerListItem.IsSelected) { MainContentFrame.Navigate(typeof(TripPlannerWindow)); } if (DeparturesListItem.IsSelected) { MainContentFrame.Navigate(typeof(DeparturesWindow)); } if (SettingsListItem.IsSelected) { MainContentFrame.Navigate(typeof(SettingsWindow), new Action(() => { // Translate sidebar whenever the language setting is modified DeparturesText.Text = _translator["Departures.Text"]; TripPlannerText.Text = _translator["TripPlanner.Text"]; SettingsText.Text = _translator["Settings.Text"]; })); } }
private void MainSwitcherSearchButton_OnChecked(object sender, RoutedEventArgs e) { MainContentFrame?.Navigate(SearchPage); }
private void MainSwitcherQueueButton_OnChecked(object sender, RoutedEventArgs e) { MainContentFrame?.Navigate(new QueuePage()); }
private void New_Recipe_Onboarding(object sender, RoutedEventArgs e) { MainContentFrame.Navigate(typeof(RecipeOnboarding)); SplitView.splitviewPage.MainNav.IsPaneOpen = false; }
// ハンバーガーメニューで[ページ【1】]が新たに選択された private void RadioButton1_Checked(object sender, RoutedEventArgs e) { MainContentFrame.Navigate(typeof(Browser.MainBrowser)); Splitter.IsPaneOpen = false; }
// ハンバーガーメニューで[ページ【3】]が新たに選択された private void RadioButton3_Checked(object sender, RoutedEventArgs e) { MainContentFrame.Navigate(typeof(Setting.SettingHubPage)); Splitter.IsPaneOpen = false; }
private void Setting_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { ViewModel.SelectedApp = null; MainContentFrame.Navigate(typeof(TestPage)); }
/// <summary> /// Laduje strone AddProductPage /// </summary> private void ButtonBase_OnClick(object sender, RoutedEventArgs e) { MainContentFrame.Navigate(new AddProductPage()); }
/// <summary> /// Laduje strone ProductsPage /// </summary> private void ProductsButton_OnClick(object sender, RoutedEventArgs e) { MainContentFrame.Navigate(new ProductsPage()); }
private void MainContentFrame_OnLoaded(object sender, RoutedEventArgs e) { MainContentFrame.Navigate(SearchPage); }
/// <summary> /// Laduje strone HomePage /// </summary> private void HomeListButton_OnClick(object sender, RoutedEventArgs e) { MainContentFrame.Navigate(new HomePage()); }