This project is read-only.

1. Add a RegisterViewViewModel method in the App.xaml.cs

/// <summary>
/// Register View and ViewModel
/// </summary>
private void RegisterViewViewModel()
INavigateService navigateService = new NavigateService(RootFrame);
SimpleIoc.Default.Register<INavigateService>(() => navigateService);

navigateService.Register<MainPage, MainViewModel>();
navigateService.Register<LoginView, LoginViewModel>();

2. Call the method in the last part of the InitializePhoneApplication method

private void InitializePhoneApplication()
if (phoneApplicationInitialized)

// Create the frame but don't set it as RootVisual yet; this allows the splash
// screen to remain active until the application is ready to render
RootFrame = new PhoneApplicationFrame();
RootFrame.Navigated += CompleteInitializePhoneApplication;


// Handle navigation failures
RootFrame.NavigationFailed += RootFrame_NavigationFailed;

// Handle reset requests for clearing the backstack
RootFrame.Navigated += CheckForResetNavigation;

#region user codes

// Ensure we don't initialize again
phoneApplicationInitialized = true;

Last edited Aug 12, 2015 at 8:25 AM by coaxhappy, version 4