Skip to content
Bishoymly edited this page Aug 8, 2012 · 2 revisions

If you want to get RSS feeds in your application, you should be using the type LinkDev.Windows8.RSS.RSSFeed

Note that RSSFeed gets items from a feed and add them into a DataGroup. So if you have multiple groups/categories in your app, each one should have an associated RSSFeed.

  1. Start by changing the code in DataModel\AppData.cs Initialize method to create a group and feed for each category, and use RSSFeed instead of the SampleFeed.

  2. So the code should look like this:

DataGroup group = GetGroup("Politics");

if(group==null)
{
    group = new DataGroup();
    group.SummaryItemsCount = 4;
    group.UniqueId = "Politics";
    group.Title = "Politics";
    ItemGroups.Add(group);
}

if (GetFeedByUrl("http://somerssfeedurl") == null)
{
     RssFeed feed = new RssFeed();
     feed.Url = "http://somerssfeedurl";
     feed.UpdateInterval = TimeSpan.FromMinutes(30);
     feed.TargetData = group;
     Feeds.Add(feed);
}

Clone this wiki locally