积极答复者
【求助】关于MVVM中如何利用代码实现Command的发送?

问题
答案
-
用这个 AttachedCommand,可以用一个事件去激发一个Command
- http://marlongrech.wordpress.com/2008/12/04/attachedcommandbehavior-aka-acb/
- http://marlongrech.wordpress.com/2008/12/13/attachedcommandbehavior-v2-aka-acb/
或者你可以模仿Blend SDK里面的设计,用
- System.Windows.Interactivity
- Microsoft.Expression.Interactions
Sincerely,
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Jie BaoModerator 2011年5月30日 2:46
全部回复
-
用这个 AttachedCommand,可以用一个事件去激发一个Command
- http://marlongrech.wordpress.com/2008/12/04/attachedcommandbehavior-aka-acb/
- http://marlongrech.wordpress.com/2008/12/13/attachedcommandbehavior-v2-aka-acb/
或者你可以模仿Blend SDK里面的设计,用
- System.Windows.Interactivity
- Microsoft.Expression.Interactions
Sincerely,
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已标记为答案 Jie BaoModerator 2011年5月30日 2:46
-
用这个 AttachedCommand,可以用一个事件去激发一个Command
- http://marlongrech.wordpress.com/2008/12/04/attachedcommandbehavior-aka-acb/
- http://marlongrech.wordpress.com/2008/12/13/attachedcommandbehavior-v2-aka-acb/
或者你可以模仿Blend SDK里面的设计,用
- System.Windows.Interactivity
- Microsoft.Expression.Interactions
Sincerely,
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
提供的链接好像还得用第三方的dll?
直接编程无法实现么?
-
自己也可以仿造者实现 只是WPF本身没有提供功能 可以让事件触发Command
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.