private void WeatherByHoursAnimationComplete(object sender, EventArgs e, TextBlock textBlock, bool flag, bool firstDay) { changeDayHourWeather(sender, e, textBlock, flag, firstDay); DoubleAnimation da = new DoubleAnimation { From = 0, To = 1, Duration = new Duration(TimeSpan.FromSeconds(0.35)), AutoReverse = false }; WeatherGraphHolder.BeginAnimation(OpacityProperty, da); }
private void AnimateWeatherChangeByHour(TextBlock textBlock, bool flag, bool firstDay) { DoubleAnimation da = new DoubleAnimation { From = 1, To = 0, Duration = new Duration(TimeSpan.FromSeconds(0.35)), AutoReverse = false }; da.Completed += (sender, e) => WeatherByHoursAnimationComplete(sender, e, textBlock, flag, firstDay); WeatherGraphHolder.BeginAnimation(OpacityProperty, da); }