CommandBinding.PreviewExecuted 事件

定义

执行与此 CommandBinding 相关联的命令时发生。

public:
 event System::Windows::Input::ExecutedRoutedEventHandler ^ PreviewExecuted;
public event System.Windows.Input.ExecutedRoutedEventHandler PreviewExecuted;
member this.PreviewExecuted : System.Windows.Input.ExecutedRoutedEventHandler 
Public Custom Event PreviewExecuted As ExecutedRoutedEventHandler 
Public Event PreviewExecuted As ExecutedRoutedEventHandler 

事件类型

注解

RoutedCommand执行 时,它会在PreviewExecuted命令目标上引发 事件。 如果命令目标具有 CommandBinding 命令的 ,则 PreviewExecuted 调用的 CommandBinding 处理程序。 如果命令目标没有 CommandBinding 命令的 ,则 PreviewExecuted 事件在元素树中向下隧道,搜索具有与命令关联的 的 CommandBinding 元素。 如果未处理预览事件,则会在 Executed 命令目标上引发该事件。

路由事件信息

标识符字段 PreviewExecutedEvent
路由策略 隧道
委托 ExecutedRoutedEventHandler

适用于

另请参阅