Integrating Mobile App Service in a Windows application
Let's get started with integrating the Mobile App Service that we just created into an application. You can use any application, but here we will use a WPF application. Open your Visual Studio IDE and navigate to File
| New
| Project...
to create a WPF project.
Creating the Model and Service Client
Once the project gets created, you need to create the Model TodoItem
in the project. To do so, right-click on the project and navigate to Add
| Class...
and name it as TodoItem
. Now copy the definition of the class from the Azure portal and replace it in the code file. Here is the code for your easy reference:
public class TodoItem { public string Id { get; set; } public string Text { get; set; } public bool Complete { get; set; } }
Now, we need to create the instance of the mobile service client, so that you can interact with Azure. Open the App.xaml.cs
file and enter the following lines of code:
public...