Building a Windows 8 Metro App, Part 3: Listing 7
The Updated MainPage_Loaded event
async void MainPage_Loaded(object sender, RoutedEventArgs e)
{
// load local settings
string defaultFeedUri = SettingsStorage.GetLocalSetting<string>(DEFAULT_FEED_KEY)
int maxFeeds = SettingsStorage.GetLocalSetting<int>(MAX_FEED_ITEMS_KEY);
if (maxFeeds > 0)
{
_maxFeeds = maxFeeds;
}
NumFeeds.Text = _maxFeeds.ToString();
if (defaultFeedUri != null)
{
FeedUrl.Text = defaultFeedUri;
await GetFeeds(defaultFeedUri);
}
}
About the Author
Eric Vogel is a Senior Software Developer for Red Cedar Solutions Group in Okemos, Michigan. He is the president of the Greater Lansing User Group for .NET. Eric enjoys learning about software architecture and craftsmanship, and is always looking for ways to create more robust and testable applications. Contact him at [email protected].