文件名称:MVVM中轻松实现Command绑定(五)获取事件参数EventArgs(2)
文件大小:290KB
文件格式:RAR
更新时间:2014-08-31 14:33:43
MVVM EventArgs
在上一节中我介绍了“MVVM中轻松实现Command绑定(四)获取事件参数EventArgs”,通过Loaded事件传递控件对象,然后添加事件方法,这样做是可以的,但是不符合MVVM的思想,今日我介绍另一种方法,通过扩展interactivity的InvokeCommandAction来实现事件参数传递。 见:http://blog.csdn.net/qing2005/article/details/6680047
【文件预览】:
EventArgsInViewModel
----EventArgsInViewModel.sln(881B)
----EventArgsInViewModel.csproj(5KB)
----ExInvokeCommandAction.cs(4KB)
----ExCommandParameter.cs(601B)
----bin()
--------Debug()
----obj()
--------x86()
----MainWindow.xaml(939B)
----Properties()
--------Resources.Designer.cs(2KB)
--------Settings.settings(201B)
--------Resources.resx(5KB)
--------Settings.Designer.cs(1017B)
--------AssemblyInfo.cs(2KB)
----MainWindowViewModel.cs(541B)
----MainWindow.xaml.cs(584B)
----App.xaml(331B)
----App.xaml.cs(295B)
----EventArgsInViewModel.suo(15KB)