private void DoMeAFavor_ItemInvoked(NavigationView sender, NavigationViewItemInvokedEventArgs args) { if (args.IsSettingsInvoked) { HomeFrame.Navigate(typeof(SettingPage)); } }
public MainPage() { InitializeComponent(); HomeFrame.Navigate(typeof(MissionHallPage)); Current = this; var coreTitleBar = CoreApplication.GetCurrentView().TitleBar; var appTitleBar = ApplicationView.GetForCurrentView().TitleBar; coreTitleBar.ExtendViewIntoTitleBar = true; appTitleBar.ButtonBackgroundColor = Colors.Transparent; }
public MainPage() { this.InitializeComponent(); MainFrame = HomeFrame; Window.Current.SetTitleBar(Appbar); AppBar = Appbar; if (State.CurrentUser == null) { HomeFrame.Navigate(typeof(LoginView)); } else { HomeFrame.Navigate(typeof(ChanelView)); } }
private async void Delete_Click(object sender, RoutedEventArgs e) { var Announcement = await Database.Context.Notes.FirstOrDefaultAsync(m => m.Id == App.thisnote.Id); if (Announcement != null) { Database.Context.Notes.Remove(Announcement); await Database.Context.SaveChangesAsync(); } else { Titlebox.Text = "该笔记不存在"; } HomeFrame.Navigate(typeof(Home)); }
private void NvSample_SelectionChanged(Microsoft.UI.Xaml.Controls.NavigationView sender, Microsoft.UI.Xaml.Controls.NavigationViewSelectionChangedEventArgs args) { var tag = (args.SelectedItem as Microsoft.UI.Xaml.Controls.NavigationViewItem)?.Tag?.ToString(); if (tag != null) { switch (tag) { case "Channels": HomeFrame.Navigate(typeof(ChanelView), null, new DrillInNavigationTransitionInfo()); break; default: break; } } }
private async void Save_Click(object sender, RoutedEventArgs e) { string editorcontent = ""; Windows.UI.Text.TextGetOptions textGetOptions = new TextGetOptions(); homeditor.Document.GetText(textGetOptions, out editorcontent); var Announcement = await Database.Context.Notes.SingleOrDefaultAsync(m => m.Id == App.thisnote.Id); if (Announcement != null) { Announcement.Title = Titlebox.Text; Announcement.Content = editorcontent; await Database.Context.SaveChangesAsync(); } HomeFrame.Navigate(typeof(Home)); }
private void ListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (AddTask.IsSelected) { HomeFrame.Navigate(typeof(AddTaskPage), null, new SuppressNavigationTransitionInfo()); if (this.ActualWidth < 700) { MySplitView.IsPaneOpen = false; } } if (ViewFavTask.IsSelected) { HomeFrame.Navigate(typeof(ViewMyTaskPage), null, new SuppressNavigationTransitionInfo()); if (this.ActualWidth < 700) { MySplitView.IsPaneOpen = false; } } if (ViewTask.IsSelected) { HomeFrame.Navigate(typeof(ViewUserTask), null, new SuppressNavigationTransitionInfo()); if (this.ActualWidth < 700) { MySplitView.IsPaneOpen = false; } } if (EditTask.IsSelected) { HomeFrame.Navigate(typeof(EditTaskPage), null, new SuppressNavigationTransitionInfo()); if (this.ActualWidth < 700) { MySplitView.IsPaneOpen = false; } } else if (Logout.IsSelected) { App.localSettings.Values["UserLoggedIn"] = null; Frame.Navigate(typeof(LoginPage)); } }
private void NavigationView_OnSelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) { NavigationViewItem item = args.SelectedItem as NavigationViewItem; var viewModel = (HallPageViewModel)DataContext; HomeFrame.Navigate(typeof(MissionHallPage)); switch (item.Tag) { case "MyPage": { if (GlobalClass.k != 0) { HomeFrame.Navigate(typeof(MyPage)); break; } else { HomeFrame.Navigate(typeof(LoginPage)); break; } } case "MissionHall": HomeFrame.Navigate(typeof(MissionHallPage)); break; case "NoLoginMyPage": //HomeFrame.Navigate(typeof(LoginPage)); break; case "MyMoney": HomeFrame.Navigate(typeof(MyMoneyPage)); break; } }
private void UserPicture_DoubleTapped(object sender, DoubleTappedRoutedEventArgs e) { State.CurrentUser = null; HomeFrame.Navigate(typeof(LoginView), null, new DrillInNavigationTransitionInfo()); }
public HomePage() { this.InitializeComponent(); HomeFrame.Navigate(typeof(AddTaskPage)); }
private void HomeButton_Click(object sender, RoutedEventArgs e) { HomeFrame.Navigate(typeof(Page1)); }
public MainPage() { this.InitializeComponent(); HomeFrame.Navigate(typeof(Page1)); }