New to Telerik UI for WPF? Download free 30-day trial

Creating the Client Application

Once you have created the Server Application, you may start developing the Client one.

To display the data from the WCF Data Service, create a new WPF application with a data source that is based on the service. Later in this walk-through, you will add data-bound controls to the application.

  1. Create a new WPF application.

  2. Generate the client code for a service of your choice. For this tutorial we are going to use the service. Name the generated file "NorthwindEntities".

  3. Add a new class inside the project and replace its declaration with the one demonstrated in Example 1.

Example 1: Defining the context

public class MyNorthwindContext : NorthwindEntities 
    public MyNorthwindContext() : base(new Uri("", UriKind.Absolute)){} 
Public Class MyNorthwindContext 
 Inherits NorthwindEntities 
 Public Sub New() 
  MyBase.New(New Uri("", UriKind.Absolute)) 
 End Sub 
End Class 

WPF RadDataServiceDataSource Generated WCF Files

See Also

In this article