Пример #1
0
        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;
                }
            }
        }
Пример #2
0
 public NewsReaderViewModel(FormattedNews n)
 {
     News = n;
 }