任何哥们都告诉我ICommand和中继库曼带示例 [英] Any buddy tell me what difference between ICommand & Relay Coomand With example

查看:150
本文介绍了任何哥们都告诉我ICommand和中继库曼带示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所有人,

任何哥们都告诉我 ICommand  & 中继并放大,并带有示例

Any buddy tell me what difference between ICommand  & Relay  Coomand  With example 

MVVM项目中的实现.

Impliment in MVVM Project.

以及我们为什么在WPF中使用这种类型的命令

and Why we use this type of command in WPF

谢谢

aniruddha acharya

aniruddha acharya

A.Acharya对我们的反馈在Windows Store中开发和推广您的应用程序,如果有帮助,请记住将其标记为答案,如果没有帮助,则将其取消标记.

A.Acharya Feedback to us Develop and promote your apps in Windows Store Please remember to mark the replies as answers if they help and unmark them if they provide no help.

推荐答案

ICommand是.NET框架中内置的接口.

RelayCommand是ICommand接口的实现(类)的示例. .NET Framework中没有可用的RelayCommand类,但您可以在MvvmLight MVVM库中找到一个: https://github.com/paulcbetts/mvvmlight/blob/master/GalaSoft.MvvmLight/GalaSoft.MvvmLight%20(NET35)/Command/RelayCommand.cs

RelayCommand is an example of an implementation (class) of the ICommand interface. There is no RelayCommand class available in the .NET Framework but you will find one in the MvvmLight MVVM library: https://github.com/paulcbetts/mvvmlight/blob/master/GalaSoft.MvvmLight/GalaSoft.MvvmLight%20(NET35)/Command/RelayCommand.cs

您可以在Laurent Bugnion(MvvmLight的创建者)的以下《 MSDN杂志》文章中阅读有关WPF和XAML中的命令及其用法的更多信息:

You can read more about commands and their usage in WPF and XAML in the following MSDN Magazine article by Laurent Bugnion - the creator of MvvmLight:

MVVM-命令,RelayCommand和EventToCommand : https://msdn.microsoft.com/zh-CN/magazine/dn237302.aspx

MVVM - Commands, RelayCommands and EventToCommand: https://msdn.microsoft.com/en-us/magazine/dn237302.aspx

我的博客文章有关如何在MVVM中处理事件也应该会有所帮助:

My blog post about how to handle events in MVVM should also be helpful: https://blog.magnusmontin.net/2013/06/30/handling-events-in-an-mvvm-wpf-application/

希望有帮助.

请记住,通过将有用的帖子标记为答案来关闭话题,然后在遇到新问题时开始新话题.请不要在同一线程中问几个问题.

Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't ask several questions in the same thread.


这篇关于任何哥们都告诉我ICommand和中继库曼带示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆