[WPF] MVVM的一点资源
2010-06-14 14:55
225 查看
1. Josh Smith发表在MSDN Maginze上的那篇《WPF Apps With The Model-View-ViewModel Design Pattern》,Link: http://msdn.microsoft.com/en-us/magazine/dd419663.aspx
John Gossman的《Introduction to Model/View/ViewModel pattern for building WPF apps》, Link: http://blogs.msdn.com/b/johngossman/archive/2005/10/08/478683.aspx
2. MVVM的本质是将UI跟后台的Logic彻底剥离,通过Binding来实现两者关联。然而,WPF现有的Functionality并不能满足这个需求。一个简单的例子是,在TreeView上实现双击(MouseDoubleClicked)事件,这个Event不能通过简单的Command进行binding。这就需要额外的工作,比如Attached Behavior:
Josh Smith在CodeProject上Article《Introduction to Attached Behaviors in WPF》,Link: http://www.codeproject.com/KB/WPF/AttachedBehaviors.aspx
偶个人推荐的一个很好的资源:Marlon Grech的AttachedCommandBehavior V2: http://marlongrech.wordpress.com/2008/12/13/attachedcommandbehavior-v2-aka-acb/
同样来自Markon Grech, 几个有用的Tips:
ListBox的多选模式的Binding: http://marlongrech.wordpress.com/2009/06/02/sync-multi-select-listbox-with-viewmodel/
使用ACB得到EventArgs: http://marlongrech.wordpress.com/2009/07/03/how-to-get-the-eventargs-as-a-commandparameter-using-the-attachedcommandbehaviour/
3. 另外一些成熟的封装库:
Sacha Barber的<Cinch>, Link: http://www.codeproject.com/KB/WPF/Cinch.aspx
Mark Smith (Julmar Technology)的<MVVM Helper Library>, Link: http://mvvmhelpers.codeplex.com/
John Gossman的《Introduction to Model/View/ViewModel pattern for building WPF apps》, Link: http://blogs.msdn.com/b/johngossman/archive/2005/10/08/478683.aspx
2. MVVM的本质是将UI跟后台的Logic彻底剥离,通过Binding来实现两者关联。然而,WPF现有的Functionality并不能满足这个需求。一个简单的例子是,在TreeView上实现双击(MouseDoubleClicked)事件,这个Event不能通过简单的Command进行binding。这就需要额外的工作,比如Attached Behavior:
Josh Smith在CodeProject上Article《Introduction to Attached Behaviors in WPF》,Link: http://www.codeproject.com/KB/WPF/AttachedBehaviors.aspx
偶个人推荐的一个很好的资源:Marlon Grech的AttachedCommandBehavior V2: http://marlongrech.wordpress.com/2008/12/13/attachedcommandbehavior-v2-aka-acb/
同样来自Markon Grech, 几个有用的Tips:
ListBox的多选模式的Binding: http://marlongrech.wordpress.com/2009/06/02/sync-multi-select-listbox-with-viewmodel/
使用ACB得到EventArgs: http://marlongrech.wordpress.com/2009/07/03/how-to-get-the-eventargs-as-a-commandparameter-using-the-attachedcommandbehaviour/
3. 另外一些成熟的封装库:
Sacha Barber的<Cinch>, Link: http://www.codeproject.com/KB/WPF/Cinch.aspx
Mark Smith (Julmar Technology)的<MVVM Helper Library>, Link: http://mvvmhelpers.codeplex.com/
相关文章推荐
- WPF程序只允许一个启动在MVVMLight框架下找不到资源的问题
- 们只是「电脑玩物」 首页 实用技巧 免费资源 超好玩的游戏 软件推荐 IT技术 资讯 编程 其它 MVVM设计模式和WPF中的实现(四) 事件绑定 07net01.com 发布于 2015-10-08
- 关于wpf和siverlight中添加资源文件的一点总结
- WPF的mvvm的一点理解和实现
- WPF程序只允许一个启动在MVVMLight框架下找不到资源的问题
- Prism初研究之使用Prism实现WPF的MVVM模式
- WPF快速指导1:资源
- 我的学习笔记关于WPF和MVVM
- WPF MVVM模式总结
- [转]WPF学习笔记之资源基础详解
- 对于信息资源管理的一点总结。。。
- WPF中通过MVVM模式来关闭View
- Silverlight/WPF/Windows Phone 开发之MVVM设计模式之入门
- Mvvm Light Toolkit for wpf/silverlight系列之Command和Events
- [转]WPF MVVM 实战
- WPF/XML 资源及相关开源项目
- WPF MVVM框架(转)
- WPF应用程序使用资源及多语言设置学习-1
- WPF使用资源绑定自定义类型
- WPF - MVVM - 如何将ComboBox的Selectchange事件binding到ViewModel