private void Img_MouseLeftButtonDown1(object sender, MouseButtonEventArgs e) { Image imgClick = (Image)sender; string source = imgClick.Tag.ToString(); items = Utiles.GetArticlesFromApi(source); articleList.Clear(); AddArticleList(items); lbNewsLists.Items.Refresh(); wbIE.Navigate(new Uri(items[0]["url"].ToString())); }
public void loadArticle() { if (Globals.currUserSub.Count != 0) { try { items = Utiles.GetArticlesFromApi(Globals.currUserSub[0].Source); AddArticleList(items); } catch (Exception ex) { MessageBox.Show("Fatal error: unable to connext to API\n" + ex.Message, "HeadLine News API error", MessageBoxButton.OK, MessageBoxImage.Error); } } lbNewsLists.Items.Refresh(); }