-
Book Overview & Buying
-
Table Of Contents
Windows Phone 7 Silverlight Cookbook
By :
Now that we have a WCF service to work with, we need to build an application that can bind to it from the Windows Phone. To do this, add a project to this solution by right-clicking the solution root and selecting Add New | Project. We add this project as a Windows Phone application called WCFClient.
Now that we have our project created, we will want to add a reference to the service by right-clicking the references folder and selecting Add Service Reference:

This will bring up the service reference tool, and we will hit the discover button to find the service that is in our other project:

Once you have seen this screen, simply change the NameSpace to MyServiceReference and then click OK.
Now to build a ViewModel that can get data from this data service:
1. Add a new class file to our project called MyViewModel.cs. This will provide the code in the client side to call the server.
2. Set up a reference to the service...
Change the font size
Change margin width
Change background colour