This project is read-only.

Creating a new View

The easy way

If you have downloaded the WindowsPhoneMvp templates, then creating a new View is easy.
To do this first create a folder in the project solution like the following:

Add folder.png

Then use "Add New Item" to select a new Windows Phone Mvp Page.

new project item.png

The template will create the minimum files needed for the new view.

new project item created.png

The manual way

There are currently a few steps to setup a new view:
  1. Create a view Interface that inherits from IView
  2. Create a ViewModel for the new view that inherits from NotificationViewModel
  3. Create a Presenter that inherits from Presenter<IView, ViewModel>
  4. Create the XAML page then these step:
    1. Add the [PresenterBinding(typeof(MyPresenter))] attribute
    2. Make it inherit from MvpPhoneApplicationPage or MvpUserControl
    3. Add the IMyView interface
    4. Change the XAML tag to <Phone:MvpPhoneApplicationPage

Last edited May 11, 2011 at 2:50 PM by brendan, version 3


No comments yet.