I want to refresh my UWP-UI periodically after like 5 minutes. I have a Method "Page_Loaded" where all information from the classes is sent to the UI-Elements. So if i refresh this method, the UI would do too, right?
The Code is like this:
private async void Page_Loaded(object sender, RoutedEventArgs e)
{
RootObject myWeather = await Openweathermap.GetWeather();
string icon = String.Format("http://openweathermap.org/img/wn/{0}@2x.png", myWeather.weather[0].icon);
ResultImage.Source = new BitmapImage(new Uri(icon, UriKind.Absolute));
TempTextBlock.Text = ((int)myWeather.main.temp).ToString() + "°";
DescriptionTextBlock.Text = myWeather.weather[0].description;
LocationTextBlock.Text = myWeather.name;
var articlesList = NewsAPI.GetNews().Result.articles;
lvNews.ItemsSource = articlesList;
Welcometxt.Text = MainPage.WelcomeText();
}
So, how do I refresh this method after 5 Minutes, so that it gets the new information and sends it to the UI?