开发者

how to declare dataset in silverlight for windows phone7 using c#?

开发者 https://www.devze.com 2023-03-18 18:58 出处:网络
Pleasepost the answer for how to declare dataset in silverlight for windows phone开发者_Python百科7 using c#? There is no support for datasets in WP7. You have to build your own datacollections. (For

Please post the answer for how to declare dataset in silverlight for windows phone开发者_Python百科7 using c#?


There is no support for datasets in WP7. You have to build your own datacollections. (For example you could use the ObservableCollection).

My suggestion would be to check the code samples on the MSDN page. (The WeatherForecast example uses webservices to retrieve data).

Also I would suggest to read some on the MVVM pattern. (MSDN Article)


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.

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

Here is a good video tutorial about "How to use webservices in WP7"

0

精彩评论

暂无评论...
验证码 换一张
取 消