简体   繁体   中英

WP7 populate listbox from WCF

Could anyone tell me how to populate a listbox in wp7 with data from a table on SQL Azure through a WCF Service.

I have done loads of work on the service, just that I cant seem to find an example that will populate a listbox with data.

Basically I need this listbox to contain 2 of the 10 fields from the database, and I then need the ID number (so a third non-visable field) saved back to the database based on the user selection.

Can anyone provide an example / link to one??

I have found one or two on here and other websites, but they dont work for me / dont confirm if my Operation Contract in the service is correct.

Thanks,

Check out this article . Just expose your SQL Azure table with a WCF Data Service usign OData. This article explains step by step how to do so.

On the other hand, once you get source data set it to ItemsSource listBox property.

Regrads,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM