Keywords: WPF. Net C # mvvm light Toolkit framework Visual Studio 2010 vs2010 expression blend 4 getting started tutorial New Practice
2. Create an mvvmlight Project
After mvvm light toolkit is installed, you can find the five project templates starting with "mvvmlight" in the new project list of vs2010. Because I want to port an original WPF project to the mvvm light Toolkit framework, I chose to create a new "mvvmlight (wpf4)" project.
The default structure of the newly created mvvmlight project is as follows: App. XAML, app. XAML. CS, and viewmodellocator. CS.
Move the existing project files to the newly created mvvmlight project. In addition to the necessary namespace, properties, and reference changes, there are two areas that need special attention: the first is to apply the mvvmlight project app. A sentence about viewmodellocator in XAML is merged into an existing project app. in XAML, the second is to apply the mvvmlight project app. XAML. C # About dispatcherhelper in Cs # merge to an existing project app. XAML. CS, as shown in the following two figures.
Compiled.