Ejemplo n.º 1
0
        private async void HomePage_Loaded(object sender, RoutedEventArgs e)
        {
            ChannelsListRequest = App.YoutubeClient.Videos.List(VideosResource.ListRequest.Parts.Snippet + 
                VideosResource.ListRequest.Parts.ContentDetails +
                VideosResource.ListRequest.Parts.Statistics,
                new VideosResource.ListRequest.Filters(VideosResource.ListRequest.Filters.Charts.MostPopular));
            ChannelsListRequest.MaxResults = 50;
            await LoadItems();

            scrollViewer = MainGrid.GetFirstDescendantOfType<ScrollViewer>();
            if (scrollViewer == null)
                return;

            scrollViewer.IsScrollInertiaEnabled = true;
            scrollViewer.ViewChanged += ScrollViewer_ViewChanged;
            scrollViewer.ViewChanged += ScrollViewer_FirstTimeChanged;                  
        }