Mvvmlight Practice One: If you add the use of Mvvmlight in your project (graphic detail)

Source: Internet
Author: User

have been doing UWP development recently, in order to save cost and so on contact with Mvvmlight, think it is necessary to send some time to study its usage and implementation principle. If there is a problem or if there is a good suggestion, please bring it up.

With the popularity of mobile development, Mvvmlight is widely used in layered development such as android,ios,wpf,silverlight and UWP. Mvvmlight also supports Xamarin development. Mvvmlight literal meaning is also easy to understand: The lightweight MVVM framework, compared to Microsoft's recent open source prism, is really straightforward. To understand Mvvmlight, you first have to understand the MVVM framework:

Before we explain how it works, we want to look at how to use Mvvmlight in a UWP project.

The first method: Add a Mvvmlight using the project template

1, add mvvmlight template (I have Visual Studio 2015 Enterprise Edition For example, community layout is the same)

Download-"Install-" automatically jumps to its documentation website after installation is complete

Prompt to restart Visual Studio, restart Visual Studio

There are options when you create a new project.

Select the Win10 template to create the project as follows: The directory structure and Viewmodellocator are automatically created.

Second method: Add Mvvmlight.lib Package through NuGet Package Manager

First new project: General-"Blank Application"-"name Mvvmlrn

Right-click the project reference, select Manage NuGet packages

Select the "Browse" tab and enter "Mvvmlightlibs" in the input box

Note: If you want to install the tool input mvvmlight, generally as a package to add the suggestion mvvmlightlibs. The second portable.mvvmlightlibs has not been updated, and the portable DLL is already included in the Mvvmlightlibs.

Select Stable version 5.2.0 on the right, click "Install", the download will pop up after the completion of the Figure 11

There is a reference in the project after the installation is complete

Specific project structure The following section continues ...

Mvvmlight Practice One: If you add the use of Mvvmlight in your project (graphic detail)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.