private void InitialSetUp() { WeatherContentControl icon = new WeatherContentControl(); icon.Template = this.Resources[weatherIcons[0]] as ControlTemplate; this.weather.Content = icon; timeVar = DateTime.UtcNow.AddHours(allTimesMargin[0]); }
private void RadButton_Click(object sender, RoutedEventArgs e) { context.NextData(); if (i < 5) { WeatherContentControl icon = new WeatherContentControl(); icon.Template = this.Resources[weatherIcons[i]] as ControlTemplate; this.weather.Content = icon; timeVar = DateTime.UtcNow.AddHours(allTimesMargin[i]); i++; } else { i = 1; InitialSetUp(); } }