i want to read rss feed from different resources and then display each result in different item of a pivot ... so the resul i got so far is creating a pivot separately ... and parsing data from one rss feed ... and i'm stuck right now .. any help please ... here is my c# code for parsing data My main page .cs
public RSShelperClass helperRSS = new RSShelperClass(); public MainPage() { this.InitializeComponent(); } private void feedClick_Click(object sender, RoutedEventArgs e) { helperRSS.Go(ref Display, Value.Text); } my helper class
public class RSShelperClass { private async void load(ItemsControl list, Uri uri) { SyndicationClient client = new SyndicationClient(); SyndicationFeed feed = await client.RetrieveFeedAsync(uri); if (feed != null) { foreach (SyndicationItem item in feed.Items) { list.Items.Add(item); } } } public void Go(ref ItemsControl list, string value) { try { load(list, new Uri(value)); } catch { } list.Focus(FocusState.Keyboard); } }
No comments:
Post a Comment