Universal Windows App Base Project

In an attempt to boost my productivity, I decided to write a base WinRT project with the essentials for all my projects. Here is what I consider essentials for all my projects:

  • MVVM Light
  • A Navigation Service
  • A Message Service
  • Global app service

These 3 items define a base universal Windows project for me, I will get into some detail on all of these in a bit. Other services like data or location services can be needed for an app but aren’t essential to all apps.

Solution hierarchy
Nothing fancy happening here. Remember to keep all files in a logical folder structure, folders work a lot better than an endless list of obtusely name files.

1

MVVM
I exclusively use MVVM Light. My experience with other patterns is minimal at best so I will not claim it superiority over everything.
When it comes to Universal Windows apps MVVM Light, unfortunately, does not have a one click solution.

Once you install it one project:

Right-click the solution and click “Manage NuGet Packages for Solution”.

2
3

Ensure all the projects you want MVVM Light to be installed in are ticked.

4

Lastly, you will need to manually copy the ViewModel folder to the shared project and delete the ViewModel folder from the Windows and Window Phone projects.

Services
These consist of 2 interfaces

5
6
You can download the code here (https://code.msdn.microsoft.com/Universal-Windows-App-Base-6eeecafc)