In this step, you will create a new WPF application, add the appropriate references and namespaces, and add two code files and a Data Service to the application.
Follow these steps:
- Create a new WPF application in Visual Studio and name it MultiUser.
- Add the following references to your application by right-clicking the References folder in the Solution Explorer and selecting Add Reference from the list. Browse to the folder where your references are located and select the following assemblies:
- C1.WPF
- C1.WPF.DateTimeEditors
- C1.WPF.Schedule
- Right-click the MultiUser.Web project and select Add | Existing Item from the list. Add the SmartData file that applies to your application (either the SmartData.cs or the SmartData.vb file) and the PlatformUriTranslator file that applies to your application (either the PlatformUriTranslator.cs or the PlatformUriTranslator.vb file).
- Right-click your application name and select Add Existing Item from the list. Locate and select the Nwind.mdb database and click Add. This will open the DataSource Configuration Wizard. Click Next.
- Select Table from the list and then click Finish. This will add the database and the NwindDataSet.xsd files to your application.
- Add the following namespaces to your MainWindow.xaml file:
- xmlns:local="clr-namespace:MultiUser"
- xmlns:c1="clr-namespace:C1.WPF;assembly=C1.WPF.Schedule"
- xmlns:c1sched="clr-namespace:C1.WPF.Schedule;assembly=C1.WPF.Schedule
In this step you created a new application, added the appropriate assembly references, added a database, and added the appropriate namespaces for your application. In the next step you will add XAML to your MultiUser application.