CommandBinding.PreviewExecuted 事件

定義

與此 CommandBinding 相關聯的命令執行時發生。Occurs when the command associated with this CommandBinding executes.

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

備註

當執行時,它會引發PreviewExecuted命令目標上的事件。 RoutedCommandWhen a RoutedCommand executes, it raises the PreviewExecuted event on the command target. 如果命令目標具有CommandBinding命令的,則PreviewExecuted CommandBinding會呼叫該的處理常式。If the command target has a CommandBinding for the command the PreviewExecuted handler for that CommandBinding is called. 如果命令目標沒有命令的,則CommandBinding事件會在PreviewExecuted專案樹狀結構中,搜尋具有與命令相關聯之的CommandBinding元素。If the command target does not have a CommandBinding for the command the PreviewExecuted event tunnels down the element tree searching for an element that has a CommandBinding associated with the command. 如果未處理預覽事件,則Executed會在命令目標上引發事件。If the preview event is not handled, the Executed event is raised on command target.

路由事件資訊Routed Event Information

識別碼欄位Identifier field PreviewExecutedEvent
路由策略Routing strategy 建立Tunneling
Delegate - 委派Delegate ExecutedRoutedEventHandler
  • 對應的反升事件Executed為。The corresponding bubbling event is Executed.

適用於

另請參閱