示例#1
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            if (albums == null)
            {
                albums = await AudioLibrary.GetRecentlyAddedAlbums(new Limits { Start = 0, End = 12 });

                MusicLLS.ItemsSource = albums;
            }

            if (episodes == null)
            {
                episodes = await VideoLibrary.GetRecentlyAddedEpisodes(new Limits { Start = 0, End = 10 });

                TVShowsLLS.ItemsSource = episodes;
            }

            if (movies == null)
            {
                movies = await VideoLibrary.GetRecentlyAddedMovies(new Limits { Start = 0, End = 15 });

                MoviesLLS.ItemsSource = movies;
            }

            base.OnNavigatedTo(e);
        }
示例#2
0
        private async void RefreshListsIfNull()
        {
            if (Albums == null)
            {
                Albums = await AudioLibrary.GetRecentlyAddedAlbums(new Limits { Start = 0, End = 12 });

                MusicHubSection.DataContext = Albums;
            }

            if (Episodes == null)
            {
                Episodes = await VideoLibrary.GetRecentlyAddedEpisodes(new Limits { Start = 0, End = 10 });

                TVHubSection.DataContext = Episodes;
            }

            if (Movies == null)
            {
                Movies = await VideoLibrary.GetRecentlyAddedMovies(new Limits { Start = 0, End = 12 });

                MoviesHubSection.DataContext = Movies;
            }
        }