c# - read rss feed and put the result of each url in item of pivot in UWP -


i want read rss feed different resources , display each result in different item of pivot ... resul got far creating pivot separately ... , parsing data 1 rss feed ... , i'm stuck right .. please ... here c# code parsing data 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);          }     } 

you must use binding approach set itemssource property of 3 listview (one listview per pivotitem).

1.- create model(class properties of feed per url)

2.- create observablecollection of model , fill al data in collection (all data rss feed)

3.- need add 3 pivot items pivot control.

4.- add 3 listview 1 listview

5.- set itemssource property of list view collections ( need 3 observablecollection because said before have 3 urls)

6.- need edit item template of listviews.

please check link

https://blogs.msdn.microsoft.com/quick_thoughts/2014/06/10/data-binding-part-4-observable-collection/


Comments