示例#1
0
        private async void LoadFilmDetails(string identifier)
        {
            var filmDetailsResponse = await _filmService.FindDetails(identifier);

            var filmDetails = filmDetailsResponse.FilmDetails;

            PosterBackground.Source = new BitmapImage(new Uri(filmDetails.Poster));
            Poster.Source           = new BitmapImage(new Uri(filmDetails.Poster));
            Title.Text    = filmDetails.Title;
            Rating.Text   = filmDetails.Ratings;
            Genre.Text    = filmDetails.Genre;
            Released.Text = filmDetails.Released;
            Plot.Text     = filmDetails.Plot;

            ToggleProgressRing();

            var filmTrailer = await _trailerService.FindTrailerFor(filmDetails.Title, filmDetails.Year);

            if (filmTrailer.Trailer != null)
            {
                Trailer.Source     = new Uri(filmTrailer.Trailer);
                Trailer.Visibility = Visibility;
            }
            else
            {
                NoTrailer.Visibility = Visibility.Visible;
            }

            ToggleProgressRing();
        }
示例#2
0
        private async void LoadFilmDetails(FilmModel film)
        {
            var filmDetailsResponse = await _filmService.FindDetails(film.Identifier);

            var filmDetails = filmDetailsResponse.FilmDetails;

            PosterBackground.Source = new BitmapImage(new Uri(filmDetails.Poster));
            await PosterBackground.Blur(duration : 10, delay : 0, value : 3).StartAsync();

            Poster.Source = new BitmapImage(new Uri(filmDetails.Poster));
            Title.Text    = filmDetails.Title;
            Rating.Text   = filmDetails.Ratings;
        }