The Model-View-ViewModel (MVVM) design pattern is a great way to separate the data from the user interface in your app. This sample demonstrates a simple MVVM application that uses XAML binding to connect the Views to the Model. The app in this sample is a “game tracker” in which the user can keep track of their achievements in a video game. This sample also uses a custom data converter, maintains page state when navigating to and from the app, and saves app data to isolated storage. For more info, see Implementing the Model-View-ViewModel Pattern in a Windows Phone Application.
To run this sample, you must have Windows Phone SDK 7.1 installed. To get started, go to the Windows Phone Dev Center.
To run the sample
-
Double-click sdkMVVM.sln to open the solution.
-
On the Build menu (or the Debug menu in Visual Studio 2010 Express for Windows Phone), click Build Solution. (Ctrl+Shift+B)
-
On the Debug menu, click Start Debugging. (F5)
| Note: |
|---|
|
This sample is packaged as a Windows Phone 7.5 project. It can be converted to a Windows Phone 8 project, by changing the target Windows Phone OS version of the project. To create a Windows Phone 8 project, you must be running the Windows Phone SDK 8.0 on Visual Studio 2012. You can download the latest version of the SDK from http://dev.windowsphone.com/downloadsdk. To convert the sample to a Windows Phone 8 project:
|