private void checkBoxWeather_Checked(object sender, RoutedEventArgs e) { listBoxForecastWeather.Visibility = System.Windows.Visibility.Visible; Weather _weatherForecast = new Weather("Kiev", true); var list = _weatherForecast.GetWeatherForecast(); listBoxForecastWeather.ItemsSource = list; txtWeatherCalled.Text = "Forecast weather"; TransitionType = TransitionEffects[EffectIndex].ToString(); Storyboard StboardFadeOut = (Resources[string.Format("{0}Out", TransitionType.ToString())] as Storyboard).Clone(); StboardFadeOut.Begin(weatherControl); Storyboard StboardFadeIn = Resources[string.Format("{0}In", TransitionType.ToString())] as Storyboard; StboardFadeIn.Begin(listBoxForecastWeather); }
private void LoadWeather(string city) { Weather _weatherCurrent = new Weather(city); weatherControl.DataContext = _weatherCurrent.GetWeather(); txtTitleWeatherFrom.Text = _weatherCurrent.GetTitle(); }