CommandBinding.PreviewExecuted Event

Definition

Si verifica quando viene eseguito il comando associato a 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 Custom Event PreviewExecuted As ExecutedRoutedEventHandler 
Public Event PreviewExecuted As ExecutedRoutedEventHandler 

Remarks

Quando viene eseguito un RoutedCommand, viene generato l'evento PreviewExecuted sulla destinazione del comando.When a RoutedCommand executes, it raises the PreviewExecuted event on the command target. Se la destinazione del comando ha un CommandBinding per il comando, viene chiamato il gestore PreviewExecuted per quel CommandBinding.If the command target has a CommandBinding for the command the PreviewExecuted handler for that CommandBinding is called. Se la destinazione del comando non dispone di un CommandBinding per il comando, il PreviewExecuted evento esegue il tunneling nell'albero degli elementi che cerca un elemento con un CommandBinding associato al comando.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. Se l'evento di anteprima non viene gestito, viene generato l'evento Executed sulla destinazione del comando.If the preview event is not handled, the Executed event is raised on command target.

Informazioni evento indirizzatoRouted Event Information

Campo identificatoreIdentifier field PreviewExecutedEvent
Strategia di routingRouting strategy TunnelingTunneling
DelegatoDelegate ExecutedRoutedEventHandler
  • L'evento di bubbling corrispondente viene Executed.The corresponding bubbling event is Executed.

Applies to

See also