Exemplo n.º 1
0
 private void OnSectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e)
 {
     HubSection section = e.Section;
     ViewModelBase viewModel = section.DataContext as ViewModelBase;
     NavigationServices.CurrentViewModel = viewModel;
     viewModel.NavigateToSectionList();
 }
Exemplo n.º 2
0
        /// <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));
 }
Exemplo n.º 4
0
        private void OnSectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e)
        {
            HubSection    section   = e.Section;
            ViewModelBase viewModel = section.DataContext as ViewModelBase;

            viewModel.NavigateToSectionList();
        }
Exemplo n.º 5
0
        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();
        }
Exemplo n.º 6
0
 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);
     }
 }
Exemplo n.º 9
0
        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);
            }
        }
Exemplo n.º 11
0
 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();
     }
 }
Exemplo n.º 12
0
 /// <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);
 }
Exemplo n.º 13
0
        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));
        }
Exemplo n.º 14
0
 private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e)
 {
     switch (e.Section.Name)
     {
         case "MapPage":
             this.Frame.Navigate(typeof(MapPage));
             break;
         default:
             break;
     }
 }
Exemplo n.º 15
0
        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();
            }
        }
Exemplo n.º 16
0
        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;
            }
        }
Exemplo n.º 17
0
        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;
            }
        }
Exemplo n.º 19
0
 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();
     }
 }
Exemplo n.º 20
0
        /// <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);
            }
        }
Exemplo n.º 21
0
        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;
            }
        }
Exemplo n.º 22
0
        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;
            }
        }
Exemplo n.º 24
0
        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;
            }
        }
Exemplo n.º 25
0
 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();
     }
 }
Exemplo n.º 26
0
        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;
            }
        }
Exemplo n.º 27
0
        /// <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;
            }
        }
Exemplo n.º 28
0
        /*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;
            }
        }
Exemplo n.º 29
0
        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;
            }
        }
Exemplo n.º 30
0
        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;
 }
Exemplo n.º 32
0
 /// <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)
 {
 }
Exemplo n.º 33
0
 /// <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)
 {
 }
Exemplo n.º 34
0
 /// <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;
 }
Exemplo n.º 35
0
 HubSection IHubSectionHeaderClickEventArgsResolver.Section(HubSectionHeaderClickEventArgs e) => e.Section;
Exemplo n.º 36
0
 /// <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);
Exemplo n.º 37
0
 private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e)
 {
     Debug.WriteLine(sender);
 }
Exemplo n.º 38
0
 /// <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);
 }
Exemplo n.º 39
0
 /// <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);
     }
 }
Exemplo n.º 40
0
 private void Hub_SectionHeaderClick(object sender, HubSectionHeaderClickEventArgs e)
 {
    
 }
Exemplo n.º 41
0
 /// <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;
 }
Exemplo n.º 43
0
 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;
     }
 }
Exemplo n.º 44
0
 void NavigateToSection(HubSectionHeaderClickEventArgs e)
 {
     var group = e.Section.DataContext;
     NavigationService.Instance.Navigate(typeof(Views.SectionPage), group);
 }
Exemplo n.º 45
0
 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;
     }
 }
Exemplo n.º 46
0
 /// <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);
 }