DispatchedDelegateCommand 类

定义

使用委托实现 ICommand,其中 "execute" 委托将以给定优先级调度到当前调度程序队列的末尾,从而允许 UI 刷新 "可以执行" 状态。

public ref class DispatchedDelegateCommand : Microsoft::VisualStudio::PlatformUI::DispatchedDelegateCommand<System::Object ^>
public class DispatchedDelegateCommand : Microsoft.VisualStudio.PlatformUI.DispatchedDelegateCommand<object>
type DispatchedDelegateCommand = class
    inherit DispatchedDelegateCommand<obj>
Public Class DispatchedDelegateCommand
Inherits DispatchedDelegateCommand(Of Object)
继承

构造函数

DispatchedDelegateCommand(Action<Object>, DispatcherPriority)
DispatchedDelegateCommand(Action<Object>, Predicate<Object>, DispatcherPriority)

方法

CanExecute(Object) (继承自 DispatchedDelegateCommand<T>)
CanExecuteDependsOn(INotifyPropertyChanged, String)

添加此命令的 CanExecute 状态所依赖的属性。 当属性更改时,此命令将引发 CanExecuteChanged

(继承自 DelegateCommandBase)
Execute(Object) (继承自 DispatchedDelegateCommand<T>)
RaiseCanExecuteChanged()

引发 CanExecuteChanged 事件。

(继承自 DelegateCommandBase)

事件

CanExecuteChanged

此命令的可执行状态更改时激发的事件。 调用 RaiseCanExecuteChanged 来强制更新侦听器。

(继承自 DelegateCommandBase)

适用于