protected override void OnNavigatedTo(NavigationEventArgs e) { base.OnNavigatedTo(e); if (HamburgerListBox.SelectedIndex == 0) { if (this.Frame != null) { MyFrame.Navigate(typeof(Home)); } } if (HamburgerListBox.SelectedIndex == 1) { if (this.Frame != null) { MyFrame.Navigate(typeof(Views.History)); } } if (HamburgerListBox.SelectedIndex == 2) { if (this.Frame != null) { MyFrame.Navigate(typeof(Views.Download)); } } if (this.Frame != null) { SecondFrame.Navigate(typeof(SecondFrame)); } }
public MainPage() { ApplicationView.PreferredLaunchViewSize = new Size(1366, 768); //起始分辨率1366*768 ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.PreferredLaunchViewSize; //加载起始分辨率 RandomBackGround(); this.InitializeComponent(); SecondFrame.Navigate(typeof(MainMenuPage)); Current = this; }
private async void ListView_OnItemClick(object sender, ItemClickEventArgs e) { var channelBindingModel = e.ClickedItem as ChannelBindingModel; if (channelBindingModel != null) { if (PlatformHelper.IsMobile) { FirstFrameProgressRing.IsActive = true; var result = await Cache.GetCachedHtml(channelBindingModel.ContentId); FirstFrameProgressRing.IsActive = false; if (!string.IsNullOrEmpty(result)) { channelBindingModel.NotifyPropertyChanged("TitleForeground"); var obj = result.ToJsonObject <InfoResult.Rootobject>(); if (obj.code == 200) { App.RootFrame.Navigate(typeof(ContentPage), obj.data); } else { await new MessageDialog(obj.message).ShowAsync(); } } } else { while (SecondFrame.CanGoBack) { SecondFrame.GoBack(); } SecondFrameProgressRing.IsActive = true; var result = await Cache.GetCachedHtml(channelBindingModel.ContentId); if (!string.IsNullOrEmpty(result)) { channelBindingModel.NotifyPropertyChanged("TitleForeground"); var obj = result.ToJsonObject <InfoResult.Rootobject>(); if (obj.code == 200) { SecondFrame.Navigate(typeof(ContentPage), obj.data); } else { await new MessageDialog(obj.message).ShowAsync(); } } SecondFrameProgressRing.IsActive = false; } } }
private void IconsListBox_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (SettingsBox.IsSelected) { SecondFrame.Navigate(typeof(SettingsPage)); //SettingsBox.IsSelected = !SettingsBox.IsSelected; } if (UserBox.IsSelected) { SecondFrame.Navigate(typeof(UserPage)); //UserBox.IsSelected = !UserBox.IsSelected; } }
private void MapPage_Loaded(object sender, RoutedEventArgs e) { SecondFrame.Navigate(typeof(InfoPage)); }
internal void NavigateToStoreCredit() { SecondFrame.Navigate(typeof(StoreCredit)); }
private void BtnAnamnese(object sender, RoutedEventArgs e) { SecondFrame.Navigate(new AnamneseView()); }