Ejemplo n.º 1
0
        private void ActivateAPOD(object sender, RoutedEventArgs e)
        {
            RestTalker nasaAPOD    = new RestTalker("https://api.nasa.gov/planetary/apod?api_key=DEMO_KEY");
            APOD       todaysPhoto = nasaAPOD.talkToRestClient();

            Main_Grid.Background = new ImageBrush {
                ImageSource = new BitmapImage(new System.Uri(todaysPhoto.Url)), Stretch = Stretch.Fill
            };
            TitleWords.Text = "NASA'S A.P.O.D.:\n" + todaysPhoto.Title.ToUpper();
        }