如何使用c#在silverlight中为windows phone7声明数据集?

如何使用c#在silverlight中为windows phone7声明数据集?

问题描述:

请张贴如何使用c#在silverlight for windows phone7中声明数据集的答案?

Please post the answer for how to declare dataset in silverlight for windows phone7 using c#?

你应该使用 ObservableCollection 来存储你的数据(你从你的 WCF 或 RESTful web 服务中读取)并将其绑定到你的 ListBox,而不是 Dataset.

Instead of Dataset you should use ObservableCollection to store your data (which you have read from your WCF or RESTful webservice) and bind it to your ListBox.

为了更多地了解如何绑定列表框,我会说:创建一个空的WP7 数据绑定应用程序"并查看它的默认实现.

To lean more about how to bind listboxes I would say: create an empty "WP7 Databound Application" and see the default implementation it has.

这是关于如何在 WP7 中使用网络服务一个>"