private async Task<Bundle> DownloadArticle() { //http://csclient.vrt.be/client/mvc/apps/detail/55ed96e00cf2fadb901bcd03 using (var client = new HttpClient()) { Bundle bundle = new Bundle(); HttpResponseMessage response = await client.GetAsync("http://csclient.vrt.be/client/mvc/apps/detail/" + _bundle.Bundle.Id); if (response.IsSuccessStatusCode) { try { var json = JArray.Parse(await response.Content.ReadAsStringAsync()); bundle = JsonConvert.DeserializeObject<Bundle>(json[0]["bundle"].ToString()); } catch (Exception ex) { Debug.WriteLine(ex.Message); } } return bundle; } }
private void CategoryPageGridView_ItemClick(object sender, ItemClickEventArgs e) { Content c = (Content)e.ClickedItem; Bundle b = new Bundle { Content = c.ContentList, Format = c.Format, Id = c.Id, LastUpdateTime = c.LastUpdateTime, Name = c.Name, Author = c.Author, Canonical = c.Canonical, Channels = c.Channels as string[], ExternalPermaLink = c.ExternalPermaLink, Tags = c.Tags, PublicationDate = c.PublicationDate, Type = c.Type }; Frame.Navigate(typeof(ItemPage), b, new EntranceNavigationTransitionInfo()); }
private void MainContentGrid_Tapped(object sender, Windows.UI.Xaml.Input.TappedRoutedEventArgs e) { Content c = _mainPageViewModel.FirstMainContentItem; Bundle b = new Bundle { Content = c.ContentList, Format = c.Format, Id = c.Id, LastUpdateTime = c.LastUpdateTime, Name = c.Name, Author = c.Author, Canonical = c.Canonical, Channels = c.Channels as string[], ExternalPermaLink = c.ExternalPermaLink, Tags = c.Tags, PublicationDate = c.PublicationDate, Type = c.Type }; Frame.Navigate(typeof(ItemPage), b, new EntranceNavigationTransitionInfo()); }