Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Revision as of 00:32, 8 November 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

How to install MVVM Light Toolkit for Windows Phone

From Wiki
Jump to: navigation, search

Overview

The MVVM Light Toolkit is a set of components to help people use the MVVM pattern (it may be used in all XAML/C# frameworks). This article shows how to install the nuget package for the MVVM Light Toolkit to a particular project.

There are other more general installation instructions in Installing the MVVM Light Toolkit (GalaSoft).

SignpostIcon XAML 40.png
WP Metro Icon WP8.png
SignpostIcon WP7 70px.png
Article Metadata
Tested with
SDK: Windows Phone 8.0 SDK, Windows Phone 7.1.1 SDK
CompatibilityArticle
Created: saramgsilva (01 Nov 2013)
Last edited: hamishwillee (08 Nov 2013)

Solution

The packages are available in the Nuget Package Manager (for both targets) and can be installed to a project as follows:

  1. Open the project and select References, open the context menu with mouse (right click) and select Manage NuGet Packages …
  2. Install MVVM Light toolkit (for information about this package go here)
    “Manage NuGet Packages …”
  3. Search for MVVM Light
    Search for MVVM Light Toolkit
    Accept the licence terms
  4. MVVM Light is then installed (as shown below)
    MVVM Light installed


Post-conditions

The installation process adds a ViewModel folder to the project containing implementations of the "main" ViewModel and ViewModelLocator (and also adds some XML to the App.xaml to set the ViewModelLocator as a data source. These changes are discussed further in How to use MVVM Light Toolkit for Windows Phone.

In addition nuget makes a number of "standard" changes:

  • The file packages.config file is added to the project, listing the installed packages:
    <?xml version="1.0" encoding="utf-8"?>
    <packages>
    <package id="MvvmLight" version="4.1.27.1" targetFramework="wp80" />
    <package id="MvvmLightLibs" version="4.1.27.1" targetFramework="wp80" />
    </packages>
  • The MVVM Light packages are installed to the project into a folder named packages, which you can find at the same level as the solution file:
    Package folder
This page was last modified on 8 November 2013, at 00:32.
259 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×