// Navigate to another page. private void Menu_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems.Count > 0) { var menuItem = e.AddedItems.First() as MenuItem; if (menuItem.IsNavigation) { switch (menuItem.Text) { case "WithoutShell": Frame.Navigate(typeof(ViewWithoutShell)); break; case "MainPage": case "SecondPage": case "ThirdPage": SplitViewFrame.Navigate(menuItem.NavigationDestination); break; } } else { menuItem.Command.Execute(null); } } }
private void NavigationExecute(string viewFrame) { switch (viewFrame) { case "Login": SplitViewFrame.Navigate(typeof(LoginView)); break; case "Recognizer": SplitViewFrame.Navigate(typeof(MainPageView)); break; case "Account": SplitViewFrame.Navigate(typeof(AccountView)); break; case "About": SplitViewFrame.Navigate(typeof(AboutView)); break; case "Exit": //Method to put 0 on db SplitViewFrame.Navigate(typeof(ExitView)); break; } IsMenuOpen = false; }
private void goToStockPortefolio(object sender, RoutedEventArgs e) { MySplitView.IsPaneOpen = false; if (MySplitView.Content != null) { SplitViewFrame.Navigate(typeof(StockPortefolio)); } }
private void goToHistoryPage(object sender, RoutedEventArgs e) { MySplitView.IsPaneOpen = false; if (MySplitView.Content != null) { SplitViewFrame.Navigate(typeof(StockHistory)); } }
public Shell() { InitializeComponent(); // Navigate to the first page. // var type = (DataContext as ShellViewModel).Menu.First().NavigationDestination; SplitViewFrame.Navigate(typeof(MainPage)); }
private void NavigationTree_OnItemInvoked(TreeView sender, TreeViewItemInvokedEventArgs args) { if (args.InvokedItem is GroupItem group) { ViewModel.Title = group.Text; SplitViewFrame.Navigate(typeof(EntriesPage), group); } }
private void Navigate(Type view) { if (view == null) { return; } SplitViewFrame.Navigate(view); }
protected override void OnNavigatedTo(NavigationEventArgs e) { SplitViewFrame.Navigate(typeof(StockPortefolio)); loadQuotesTask(null, null); dispatch = new DispatcherTimer(); dispatch.Interval = new TimeSpan(0, 0, 2); dispatch.Tick += loadQuotesTask; dispatch.Start(); }
private void Shell_GoToViewerEvent(object sender, EventArgs e) { if (ShellViewModel.SelectedBook == null) { return; } SplitViewFrame.Navigate(typeof(PdfPage)); SplitViewFrame.DataContext = new ViewModels.PdfViewModel(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { // tile ID sent from App.xaml.cs in the NavigationEventArgs parameter if (App.SecTile == true) { App.SelNota = Int32.Parse(e.Parameter.ToString()); SplitViewFrame.Navigate(typeof(GestionNota), "Edit"); } }
public Shell() { this.InitializeComponent(); // Navigate to the first page (optionally) var type = (DataContext as ShellViewModel).Menu.First().NavigationDestination; SplitViewFrame.Navigate(type); }
public Shell() { this.InitializeComponent(); // Navigate to the first page. var type = (DataContext as ShellViewModel).Menu.First().NavigationDestination; SplitViewFrame.Navigate(type); this.SizeChanged += Shell_SizeChanged; }
// Navigate to another page. private void Menu_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems.Count > 0) { var menuItem = e.AddedItems.First() as MenuItem; if (menuItem != null && menuItem.IsNavigation) { SplitViewFrame.Navigate(menuItem.NavigationDestination); } } }
private void navigateToMenuItem(NavLink menuItem) { this.closePaneOnTap = menuItem.PaneCloseOnTap; SplitViewFrame.Navigate(menuItem.TargetPage); splitView.DisplayMode = menuItem.MenuDisplayMode; if (menuItem.PaneCloseOnNavigation) { splitView.IsPaneOpen = false; } }
private void Navigate(Type view) { var type = view.Name; var standing = new StandingData { Driver = _driverStanding, Constructor = _constructorStanding }; SplitViewFrame.Navigate(view, standing); BackCommand.RaiseCanExecuteChanged(); }
private void NavigationExecute(string viewFrame) { switch (viewFrame) { case "SecondView": SplitViewFrame.Navigate(typeof(SecondView)); break; case "OtherView": SplitViewFrame.Navigate(typeof(OtherView)); break; } IsMenuOpen = false; }
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (Create.IsSelected) { SplitViewFrame.Navigate(typeof(CreateNoteView)); } else if (Favorite.IsSelected) { SplitViewFrame.Navigate(typeof(FavoriteNotesView)); } else if (Show.IsSelected) { SplitViewFrame.Navigate(typeof(ShowNotesView)); } }
private void Menu_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems.Count > 0) { var menuItem = e.AddedItems.First() as MenuItem; if (menuItem.IsNavigation) { SplitViewFrame.Navigate(menuItem.NavigationDestination); MySplitView.IsPaneOpen = false; } else { menuItem.Command.Execute(null); } } }
private void Navigate(Type view) { if (view == null) { return; } var type = view.Name; switch (type) { case "RestaurantView": SplitViewFrame.Navigate(view); break; } }
public Shell() { InitializeComponent(); timer = new DispatcherTimer(); timer.Interval = TimeSpan.FromSeconds(3); timer.Tick += Timer_Tick; // Navigate to the first page (optionally) var type = (DataContext as ShellViewModel).Menu.First().NavigationDestination; SplitViewFrame.Navigate(type); // return MainPageView SplitViewFrame.DataContext = (DataContext as ShellViewModel).MainViewModel; ShellViewModel.ShowMessageEvent += ShellViewModel_ShowMessageEvent1; ShellViewModel.ShowMessageDialogEvent += ShellViewModel_ShowMessageDialogEvent; GoToViewerEvent += Shell_GoToViewerEvent; }
private void Navigate(Type view) { var type = view.Name; switch (type) { case "LocalMainPage": SplitViewFrame.Navigate(view); break; case "RedditMainPage": SplitViewFrame.Navigate(view); break; case "AboutView": SplitViewFrame.Navigate(view); break; } }
private void Navigate(Type view) { var type = view.Name; switch (type) { case "HomeView": SplitViewFrame.Navigate(view, _driverStanding); break; case "StandingsView": SplitViewFrame.Navigate(view, _driverStanding); break; case "AboutView": SplitViewFrame.Navigate(view); break; } }
public Shell() { this.InitializeComponent(); // Navigate to the first page. if ((DataContext as ShellViewModel).Menu.Count > 0) { var type = (DataContext as ShellViewModel).Menu.First().NavigationDestination; SplitViewFrame.Navigate(type); } else { SplitViewFrame.Navigate(typeof(MainPage)); // Por defecto cargo MainPage, si no hay elementos de menú creados desde ShellViewModel } this.SizeChanged += Shell_SizeChanged; this.MySplitView.LayoutUpdated += MySplitView_LayoutUpdated; T_Version.Text = App.GetAppVersion(); }
private void Navigate(Type view) { var type = view.Name; switch (type) { case "HomeView": SplitViewFrame.Navigate(view, _driverStanding); break; case "StandingsView": SplitViewFrame.Navigate(view, _driverStanding); break; case "AboutView": SplitViewFrame.Navigate(view); break; } BackCommand.RaiseCanExecuteChanged(); }
private void Menu_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (e.AddedItems.Count <= 0) { return; } var menuItem = e.AddedItems.First() as MenuItem; if (menuItem.NavigationDestination == typeof(PdfPage) && ShellViewModel.SelectedBook == null) { return; } if (menuItem.IsNavigation) { SplitViewFrame.Navigate(menuItem.NavigationDestination); SplitViewFrame.DataContext = menuItem.ViewModel; } else { menuItem.Command.Execute(null); } }
private void NavigationExecute(string viewFrame) { switch (viewFrame) { case "Home": SplitViewFrame.Navigate(typeof(HomeViewModel)); break; case "Recognizer": SplitViewFrame.Navigate(typeof(MainPageViewModel)); break; case "Account": SplitViewFrame.Navigate(typeof(AccountViewModel)); break; case "Exit": //Method to put 0 on db SplitViewFrame.Navigate(typeof(OtherView)); break; } IsMenuOpen = false; }
/// <summary> /// Navigates to the specified source page type. /// </summary> public bool Navigate(Type sourcePageType, object parameter = null) { return(SplitViewFrame.Navigate(sourcePageType, parameter)); }