原文:[MVVM Light]Messenger 的使用 当我们使用MVVM开发模式进行开发时,ViewModel之间的通信常常是很头疼的事情,好在MVVM Light提供了Messenger类可以轻松的在ViewModel之间传递消息. Messenger Messenger 其他类成员可以通过Register 方法 来建立与Messenger的联系,注册时包含当收到Message的时候要执行的方法.当使用Send方法时,注册的相关的方法将会被调用. The Messager is a cla…
4.关于子视图, MVVMLight Using Two Views:http://www.codeproject.com/Articles/323187/MVVMLight-Using-Two-Views 3.这篇讲的不错:MVVM.MVVMLight.MVVMLight Toolkit之我见 2.using the code snippet: a.in Visual Studio, in the code behind file, MainViewModel.cs, enter the le…
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 demon…
public class MainStudentModel:ViewModelBase { //实体 private StudentModel stu = new StudentModel(); public string StuName { get { return stu.Name; } set { stu.Name = value; /…
After I create a MvvmLight(Win81) project, I want add a new view , but there is only MvvmView(Win8), there is no MvvmView(Win81) 在源代码 mvvmlight_638169c85b8c\Installer\InstallItems\GalaSoft.MvvmLight.Templates\ItemTemplates中找到View.Win81等3个压缩文件,将其拷贝至C…
This gives you the ability to create a trigger on an event and bind it to an ICommand on the view model. <Button> <i:Interaction.Triggers> <i:EventTrigger EventName="MouseEnter" > <i:InvokeCommandAction Command="{Bindin…
In my opinion, if you are using WPF or Silverlight you should be using the MVVM design pattern. It is perfectly suited to the technology and allows you to keep your code clean and easy to maintain. The problem is, there are a lot of online resources…