我正在尝试创建一个简单的Silverlight应用程序,它调用ATOM提要并显示文章标题和提交日期.我发现使用RSS提要和LINQ很容易做到这一点,但是我很难尝试使用ATOM提要做同样的事情.下面的代码没有产生错误,但也没有产生任何结果!我错过了什么?
来源ATOM提要:weblogs.asp.net/scottgu/atom.aspx
源教程:www.switchonthecode.com/tutorials/silverlight-datagrid-the-basics
源代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Xml.Linq;
namespace BasicDataGridTutorial
{
public partial class Page : UserControl
{
public Page()
{
InitializeComponent();
}
private void btnPopulate_Click(object sender, RoutedEventArgs e)
{
//disable the populate button so it's not clicked twice
//while the data is being requested
this.btnPopulate.IsEnabled = false;
//make a new WebClient object
WebClient client = new WebClient();
//hook the …Run Code Online (Sandbox Code Playgroud)