i am making a windows 8 store blog reader application, and i am having trouble with navigating from the first page of my application to the second. The first page provides a list of items and on clicking one, you navigate to the second page which gives more information about the selected item based on its title. The code for doing this is as below.
public static FeedData GetFeed(string title)
{
// Simple linear search is acceptable for small data sets
var _feedDataSource = App.Current.Resources["feedDataSource"] as FeedDataSource;
var matches = _feedDataSource.Feeds.Where((feed) => feed.Title.Equals(title));
if (matches.Count() == 1) return matches.First();
return null;
}
When i run the application i get the error NullReferenceWasUnhandledByUserCode. Object reference not set to an instance of an object. Can someone kindly give a workaround for this.