DelegateCommand 位于哪个命名空间中?

发布于 2024-09-10 17:32:17 字数 422 浏览 1 评论 0 原文

我正在尝试从“.NET Domain Driven Design with C#”中找出一个示例,其中包含一个代码示例,您可以在其中看到声明的一些 DelegateCommand 类型的属性。

现在,我尝试用谷歌搜索它,但我在 MSDN 上找不到它的参考(实际上,我发现 这篇文章,但不是 DelegateCommand 的文章本身)。

DelegateCommandWPF 的一部分还是只是书中创建的内容?

如果它是 WPF(或任何其他 MS 产品)的一部分,那么它位于哪个程序集/命名空间中?

I am trying to work out an example from ".NET Domain Driven Design with C#", which contains a code example where you can see declared some attributes of type DelegateCommand.

Now, I've tried googling it up, but I can't find its reference anywhere on MSDN (actually, I found this article, but not DelegateCommand's article itself).

Is the DelegateCommand something that's part of WPF or is it just something created in the book?

If it's part of WPF (or any other MS product), in which assembly/namespace is it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

℡Ms空城旧梦 2024-09-17 17:32:17

如果你使用MS Prism,下载lib,添加对项目的引用,那么你就有了

using Microsoft.Practices.Prism.Commands; // for DelegateCommand & RaisePropertyChanged

If you use MS Prism,downlaod the lib, add the reference to the project, then you have

using Microsoft.Practices.Prism.Commands; // for DelegateCommand & RaisePropertyChanged
姐不稀罕 2024-09-17 17:32:17

DelegateCommand(尚)不是标准库 (BCL) 的一部分。

它是 MVVM 的 WPF 命令绑定的一部分。

在我们在 VS 中获得“官方”MVVM 模板之前,所有 MVVM 示例/工具包都在自己的某个地方定义了它。并不总是具有相同的名称或在相同的地点。

The DelegateCommand is not (yet) part of the standard library (BCL).

It is part of WPF command-binding for MVVM.

Until we get an 'official' MVVM template in VS, all the MVVM examples/toolkits define it somewhere themselves. Not always with the same name or in the same place.

西瑶 2024-09-17 17:32:17

DelegateCommandsICommand 的自定义实现。 DelegateCommand 已在 prism(复合应用程序框架)中引入(如果我错了,请纠正我) - http ://compositewpf.codeplex.com/

您可以使用它,也可以按照此处的方式实现您自己的 -

https://web.archive.org/web/20101120214610/http://kentb.blogspot.com/2009 /04/mvvm-infrastruct-delegatecommand.html

DelegateCommands is a custom implementation of ICommand. DelegateCommand was introduced(correct me if I am wrong) in prism(Composite Application framework) - http://compositewpf.codeplex.com/

You can use that or you can implement your own as done here -

https://web.archive.org/web/20101120214610/http://kentb.blogspot.com/2009/04/mvvm-infrastructure-delegatecommand.html

撩心不撩汉 2024-09-17 17:32:17

我发现它名为 RelayCommand (老实说,我认为这是原来的名称)。请看这里:

MVVM 路由和中继命令

http://msdn.microsoft.com/en-us /杂志/dd419663.aspx#id0090051

希望有所帮助!

I've found it called RelayCommand (I think that's the original name, to be honest). Please see here:

MVVM Routed and Relay Command

http://msdn.microsoft.com/en-us/magazine/dd419663.aspx#id0090051

Hope that helps!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文