async Task GetNews(string url) { if (!string.IsNullOrWhiteSpace(url)) { try { item = await JsonHelper.GetFormattedNews(url); this.DataContext = new NewsReaderViewModel(item); } catch { ErrorGrid.Visibility = Visibility.Visible; } } }
public NewsReaderViewModel(FormattedNews n) { News = n; }