How to install MVVM Light Toolkit via NuGet

本文详细介绍了如何使用Visual Studio通过NuGet安装MVVMLight Toolkit。步骤包括创建项目、安装NuGet包管理器、搜索并安装MVVMLight包等。安装完成后,项目将引用MVVMLight组件并自动生成ViewModel文件夹。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Here is how you can install MVVM Light Toolkit  via NuGet in an easy way using only Visual Studio.

Step1. Create a new Widows Phone Application Project

Step2. If you have not used NuGet before then go to VisualStudio Tools-> ExtentionManager as demonstrated below:

image

Step3.Go to "Online Gallery" tab and type "nuget" in the search box. Next  install "NuGet Package Manager"  as demonstrated below:

image

Step4. After you have installed the NuGet Package Manager just right-click the References folder in your project and from the context menu select the "Manage NuGet Packages.." option:

image

Step5-a. A new window will appear where you can search for a particular package. So just start typing "mvvm light"  in the search box and you should see the "MVVM Light" package on top. Next press install.

image

Step5-b: Alternatively you can Installing he "MVVM Light" package using the command line:

Just go to View ->Other Windows -> Package Manager Console:

image

Next type the following code in the console:

PM> Install-Package MvvmLight

Step6. After the installation has finished you should see the following:

image

Step7. That was all. You will notice that your project now references the MVVM Light assemblies and a new View Model folder has been automatically added to your project. Your project is now set up and  you are ready to start using the MVVM Light in your application. A ViewModelLocator is also added to your project and included it in App.xaml.

image

Step8. Later if you would like to update to the latest version of MVVM Light, you can use the following NuGet command:

PM> Update-Package MvvmLight

That was all about how to install "MVVM Light  Toolkit"  via NuGet. I hope that the tip was helpful.

 

原文链接:http://windowsphonegeek.com/tips/How-to-install-MVVM-Light-Toolkit-via-NuGet

转载于:https://www.cnblogs.com/Peter-Luo/p/3523789.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值