private void OnSectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; ViewModelBase viewModel = section.DataContext as ViewModelBase; NavigationServices.CurrentViewModel = viewModel; viewModel.NavigateToSectionList(); }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var platform = section.DataContext; this.Frame.Navigate(typeof(SectionPage), ((Platform)platform).Id); }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; //var group = section.DataContext; //this.Frame.Navigate(typeof(SectionPage), ((SampleDataGroup)group).UniqueId); //this.Frame.Navigate(typeof(SectionPage)); }
private void OnSectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; ViewModelBase viewModel = section.DataContext as ViewModelBase; viewModel.NavigateToSectionList(); }
private async void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { StatusBar bar = StatusBar.GetForCurrentView(); switch (e.Section.Name) { case "Main": bar.BackgroundColor = Windows.UI.Colors.Peru; bar.BackgroundOpacity = 1; break; case "calc": bar.BackgroundColor = Windows.UI.Colors.DarkGreen; break; case "Formu": bar.BackgroundColor = Windows.UI.Colors.DarkOrchid; break; case "about": bar.BackgroundColor = Windows.UI.Colors.DarkBlue; break; default: break; } await bar.ShowAsync(); }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { if (e.Section == pokemon) { this.Frame.Navigate(typeof(PageB)); } }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { switch ((sender as Hub).Sections.IndexOf(e.Section)) { case 1: Frame.Navigate(typeof(AccessoriesGroupPage), "recent"); break; case 2: Frame.Navigate(typeof(AccessoriesGroupPage), "favorite"); break; case 3: Frame.Navigate(typeof(AccessoriesGroupPage), "all"); break; } }
private void championHub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { if (e.Section.Name == "abilitiesHubSection") { List <object> parameters = new List <object>(); parameters.Add(champion); Frame.Navigate(typeof(ChampionAbilitiesDetailPage), parameters); } }
private static void OnSectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { var control = sender as Hub; var command = GetCommand(control); if (command != null && command.CanExecute(e.Section.DataContext)) { command.Execute(e.Section.DataContext); } }
private static void OnSectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { var control = sender as Hub; var command = GetCommand(control); if (command != null && command.CanExecute(e.Section.DataContext)) { command.Execute(e.Section.DataContext); } }
private async void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { var clickedSection = e.Section; if (clickedSection.Name == "TrailersSection") { // Add navigation logic var dialog = new MessageDialog("The navigation logic can be added in here."); await dialog.ShowAsync(); } }
/// <summary> /// 在单击 HubSection 标题时调用。 /// </summary> /// <param name="sender">包含单击了其标题的 HubSection 的中心。</param> /// <param name="e">描述如何启动单击的事件数据。</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var group = section.DataContext; if (group is System.Collections.ObjectModel.ObservableCollection<NewsSample.Data.SampleDataGroup>) { return; } this.Frame.Navigate(typeof(SectionPage), ((SampleDataGroup)group).UniqueId); }
void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; //var group = section.DataContext; //this.Frame.Navigate(typeof(SectionPage), ((SampleDataGroup)group).UniqueId); //↓【第6回】画面遷移先を修正する // var feed = section.DataContext as DataModel.Feed; this.Frame.Navigate(typeof(HistoryPage)); }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { switch (e.Section.Name) { case "MapPage": this.Frame.Navigate(typeof(MapPage)); break; default: break; } }
private async void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { var clickedSection = e.Section; if (clickedSection.Name == "TrailersSection") { // Add navigation logic var dialog = new MessageDialog("The navigation logic can be added in here."); await dialog.ShowAsync(); } }
private void ContentHub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { switch (e.Section.Name) { case "mainSection": { this.Frame.Navigate(typeof(MainPage)); } break; case "convertorSection": { this.Frame.Navigate(typeof(Conver)); } break; case "aboutAuthorSection": { this.Frame.Navigate(typeof(Auhor)); } break; } }
void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var group = section.DataContext; //this.Frame.Navigate(typeof(SectionPage), ((SampleDataGroup)group).UniqueId); if (section.Name == "SearchSection") { ToggleSearchView(); } }
private async void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { switch (e.Section.Name) { case "NavigateSection": await this.DoStuff(); break; default: break; } }
private void Hub_OnSectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { if (e.Section == NewestSection) { NavigateToNewest(); } else if (e.Section == TopSection) { NavigateToTop(); } else if (e.Section == FavoritesSection) { NavigateToFavorites(); } }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var viewModel = (MainViewModel)this.DataContext; var podcasts = viewModel.AllPodcasts.OrderBy(p => p.Podcast.Name).ToList(); var episodes = podcasts.SelectMany(p => p.Episodes).OrderByDescending(ep => ep.Episode.Published).ToList(); if (section.Header.Equals("Subscriptions")) { this.Frame.Navigate(typeof(PodcastsPage), podcasts); } if (section.Header.Equals("Episodes")) { this.Frame.Navigate(typeof(EpisodesPage), episodes); } }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { switch (e.Section.Name) { case "hsecPopulation": this.Frame.Navigate(typeof(PoblacioMasterPage)); break; case "hsecEconomy": //this.Frame.Navigate(typeof()); break; default: break; } }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { SuspensionManager.SessionState["SelectedSection"] = e.Section.Name; switch (e.Section.Name) { case "Images": rootPage.Frame.Navigate(typeof(ImagesPage), rootPage); break; case "Videos": rootPage.Frame.Navigate(typeof(VideosPage), rootPage); break; default: break; } }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { switch (e.Section.Name) { case "About": this.Frame.Navigate(typeof(About)); break; case "Conv": this.Frame.Navigate(typeof(Convert)); break; default: this.Frame.Navigate(typeof(About)); break; } }
public void hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { Hub hub = sender as Hub; Frame frame = (Frame)hub.Parent; switch (e.Section.Name) { case "image1": frame.Navigate(typeof(View.Page1)); break; case "image2": frame.Navigate(typeof(View.Page2)); break; case "image3": frame.Navigate(typeof(View.Page3)); break; } }
private void Hub_OnSectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { if (e.Section == MovieSection) { App.MainVm.GotoAllMovies(); } if (e.Section == TVSection) { Frame.Navigate(typeof(TvShowsPage)); } if (e.Section == MusicSection) { App.MainVm.ResetMusic(); Frame.Navigate(typeof(MusicArtistsPage)); } if (e.Section == PeopleSection) { App.MainVm.GotoAllMovies(); } }
private async void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { interactiveHeader.Header = e.Section.Name; switch (e.Section.Name) { case "interactiveHeader": var messageDialog = new MessageDialog("Oh wow! You clicked on an interactive header that does nothing. Big Deal!"); // Show the message dialog and wait messageDialog.Commands.Add(new UICommand("Yes")); messageDialog.Commands.Add(new UICommand("Yes")); await messageDialog.ShowAsync(); break; default: break; } }
/// <summary> /// Fired whenever one of the headers is clicked; use for navigational purposes /// </summary> private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { switch (e.Section.Name) { // check which section has been clicked and go to that page case "sctMembers": this.Frame.Navigate(typeof(SplitMembers)); break; case "sctSessions": this.Frame.Navigate(typeof(SplitSessions)); break; case "sctGames": this.Frame.Navigate(typeof(SplitGames)); break; case "sctTournaments": this.Frame.Navigate(typeof(SplitTournaments)); break; } }
/*public async void LoadCSV() * { * HttpClient client = new HttpClient(); * string earthQuakeData = await client.GetStringAsync("http://goodplacetolive.azurewebsites.net/hospital_adult1.txt"); * var results = JsonConvert.DeserializeObject<ObservableCollection<HospitalAdultItem>>(earthQuakeData.ToString()); * foreach (var item in results) * { * await item.LoadCustomerData(); * await HospitalsTable.InsertAsync(item); * } * Debug.WriteLine("Import finished"); * }*/ /// <summary> /// Вызывается при щелчке заголовка HubSection. /// </summary> /// <param name="sender">Главная страница, которая содержит элемент HubSection, заголовок которого щелкнул пользователь.</param> /// <param name="e">Данные события, описывающие, каким образом был инициирован щелчок.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; //var group = section.DataContext; //this.Frame.Navigate(typeof(SectionPage), ((SampleDataGroup)group).UniqueId); switch (e.Section.Name) { case "Hospitals": this.Frame.Navigate(typeof(HospitalsListPage)); break; case "ChildPlaces": this.Frame.Navigate(typeof(ChildPlacesListPage)); break; case "PlaceInfo": this.Frame.Navigate(typeof(PlaceChangePage)); break; default: break; } }
private void NewsHub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { switch (e.Section.Name) { case "Funcionalidade1": Frame.Navigate(typeof(ClassClientFunc)); break; case "Funcionalidade2": Frame.Navigate(typeof(ClientLocalidadeFunc)); break; case "Funcionalidade3": Frame.Navigate(typeof(TreinadorAulaFunc)); break; case "Funcionalidade4": Frame.Navigate(typeof(SalaAulaFunc)); break; default: break; } }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { Frame.Navigate(typeof(MyPage1)); ScrollViewer myscrollviewer = FindControl <ScrollViewer>(MyHub); if (myscrollviewer != null) { double horiOffset = (double)myscrollviewer.GetValue(ScrollViewer.HorizontalOffsetProperty); double vertOffset = (double)myscrollviewer.GetValue(ScrollViewer.VerticalOffsetProperty); } DisplayVisualTree(MyHub, 0); VisualTreeHelper.GetParent(MyHubSection); ScrollViewer childScrollViewer = findChildScrollViewer(MyHub); if (childScrollViewer != null) { double horizOffset = (double)childScrollViewer.GetValue(ScrollViewer.HorizontalOffsetProperty); double vertOffset = (double)childScrollViewer.GetValue(ScrollViewer.VerticalOffsetProperty); } }
public void OnHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { Info = e.Section.Tag as string; }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick_Articles(object sender, HubSectionHeaderClickEventArgs e) { }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var group = section.DataContext; }
HubSection IHubSectionHeaderClickEventArgsResolver.Section(HubSectionHeaderClickEventArgs e) => e.Section;
/// <summary> /// Gets the <see cref="HubSection"/> for the header that was clicked. /// </summary> /// <param name="e">The requested <see cref="HubSectionHeaderClickEventArgs"/>.</param> /// <returns>The <see cref="HubSection"/> for the header that was clicked.</returns> public static HubSection Section(this HubSectionHeaderClickEventArgs e) => Resolver.Section(e);
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { Debug.WriteLine(sender); }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var group = section.DataContext; this.Frame.Navigate(typeof(SectionPage), (ObservableCollection<AppInfo>)group); }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var viewModel = (MainViewModel)this.DataContext; var podcasts = viewModel.AllPodcasts.OrderBy(p => p.Podcast.Name).ToList(); var episodes = podcasts.SelectMany(p => p.Episodes).OrderByDescending(ep => ep.Episode.Published).ToList(); if (section.Header.Equals("Subscriptions")) { this.Frame.Navigate(typeof(PodcastsPage), podcasts); } if (section.Header.Equals("Episodes")) { this.Frame.Navigate(typeof(EpisodesPage), episodes); } }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var group = section.DataContext; this.Frame.Navigate(typeof(SectionPage), ((WaterFountain)group).name); }
public void OnHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { Info = e.Section.Tag as string; }
private void SectionHeader_Click(object sender, HubSectionHeaderClickEventArgs e) { switch (e.Section.Header.ToString()) { case "Latest": this.Frame.Navigate(typeof(LatestBlogs)); break; case "Starred": break; default: break; } }
void NavigateToSection(HubSectionHeaderClickEventArgs e) { var group = e.Section.DataContext; NavigationService.Instance.Navigate(typeof(Views.SectionPage), group); }
private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { SuspensionManager.SessionState["SelectedSection"] = e.Section.Name; switch (e.Section.Name) { case "Images": rootPage.Frame.Navigate(typeof(ImagesPage), rootPage); break; case "Videos": rootPage.Frame.Navigate(typeof(VideosPage), rootPage); break; default: break; } }
/// <summary> /// Invoked when a HubSection header is clicked. /// </summary> /// <param name="sender">The Hub that contains the HubSection whose header was clicked.</param> /// <param name="e">Event data that describes how the click was initiated.</param> void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { HubSection section = e.Section; var group = section.DataContext; this.Frame.Navigate(typeof(SectionPage), ((SampleDataGroup)group).UniqueId); }
void AssociatedObject_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e) { object sectionHeaderItem = e.Section.DataContext; Interaction.ExecuteActions(AssociatedObject, this.Actions, sectionHeaderItem); }