Calling a WCF service in a Windows store app is a bit different from the normal WPF here is a sample on how to do it images + code
- First lets add a reference to the WFC service in our project
Right click on reference -> add service reference
- Paste the URL in the address bar and press GO. the functions of the service should appear.
- Calling the WFC service from the Code behind.
Lets assume we name the service PROXY in the namespace from the previous step.
Here is a sample code on how to call the function GetAllPictures available in the service which returns a List<Picture> (Picture is the DataContract of the service)
LPServicesClient proxy = new LPServicesClient();
Task<List<LPProxy.Picture>> results = proxy.GetAllPicturesAsync();
List<Picture> result = results.Result;
Hope this helped you, if you have any comment please add them below, and remember it’s only logical to share