MVVM Light Toolkit: Lightweight MVVM framework

jobbole-mvvmlight

The MVVM Light Toolkit is primarily designed to accelerate the process of creating and developing MVVM programs for WPF, Silverlight, Windows Store (RT), and Windows Phone.

MVVM Light Toolkit can help you separate view and model, which makes the application cleaner and easier to maintain and extend. It also creates testable programs, and you can make the user interface layer (which is often difficult to test) much lighter.

This tool focuses on "blend usability" when creating applications, that is, the ability to edit the user interface in Blend, and users can create design-time specific data so that Blend users can see some data when designing data controls.

Install

Add MVVM Light to existing project

If you want to add MVVM Light to an existing project, your application uses the NuGet package manager to download and add MVVM Light!

use source code

If you want, you can get the source code of MVVM Light, which is completely optional. MVVM Light is an open source project under the MIT license, for more information, please visit here .

Clean up before installation

MVVM Light is fairly "historical", with files installed in various locations. To prevent problems, if you know you have manually installed an older version of MVVM Light, we recommend that you clean up the old files. For convenience, you can download a cleanup program and follow the guidelines on the Cleanup page .

Installation Notes

The best way to install MVVM Light in Visual Studio 2012 and 2013 is to use the Extensions and Update Manager.

  1. Start Visual Studio 2012 or 2013.
  2. Select the Tools menu, Extensions and Updates.
  3. In the extension and update dialog, select "Online" on the left.
  4. Type "mvvm light" in the search box.
  5. Click the download button.
  6. Wait for the download to complete.
  7. Accept the agreement.
  8. Click the restart button.

1

2

3

4

5

6

7

8

MVVM Light安装后,选择“文件”,“新项目”菜单,就可以看到MVVM Light的项目模板了:) 另外,如果你在代码编辑时输入“mvvm”,你将可以看见可用的代码片段。

使用

创建新的MVVM Light项目

如果你从头开始创建项目,你可以在Visual Studio中创建一个新的MVVM Light项目,MVVM Light为每一个支持的XAML框架(WPF, Silverlight, Windows Phone, Windows 8)都安装了一个项目模板。

  • 在Visual Studio中,选择文件菜单,新建,项目。
  • 在新建项目的对话框,在以下项中选择一个分类: Windows Store (Windows 8), Windows (WPF), Silverlight, Windows Phone。所有的模板在Visual C#分类中都直接可见。

9

运行程序

  • 在Visual Studio中,按下Ctrl-F5以执行示例程序。
  • 对应的环境将会启动,程序也会正常显示。

开发资源

协议

MVVM Light Toolkit遵循MIT开源协议发布。

Official website: http://www.mvvmlight.net/Open
source address: http://mvvmlight.codeplex.com/

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326976329&siteId=291194637