CommandBinding.PreviewCanExecute イベント

定義

この CommandBinding に関連付けられているコマンドが、現在のコマンド ターゲットでコマンドを実行できるかどうかを判断するチェックを開始するときに発生します。

public:
 event System::Windows::Input::CanExecuteRoutedEventHandler ^ PreviewCanExecute;
public event System.Windows.Input.CanExecuteRoutedEventHandler PreviewCanExecute;
member this.PreviewCanExecute : System.Windows.Input.CanExecuteRoutedEventHandler 
Public Custom Event PreviewCanExecute As CanExecuteRoutedEventHandler 
Public Event PreviewCanExecute As CanExecuteRoutedEventHandler 

イベントの種類

注釈

RoutedCommandCanExecute メソッドが呼び出されると、コマンド ターゲットにコマンドのCommandBindingがある場合、コマンド ターゲットでPreviewCanExecute イベントが発生します。 その後、そのCommandBindingCanExecute ハンドラーが呼び出されます。 コマンド ターゲットにコマンドの CommandBinding がない場合、 CanExecute イベントは、コマンドに関連付けられた CommandBinding を持つ要素を検索する要素ツリーをバブル アップします。 イベントが処理されない場合は、 CanExecute イベントが発生します。

ルーティング イベント情報

品目 価値
識別子フィールド PreviewCanExecuteEvent
ルーティング戦略 トンネリング
代理人 CanExecuteRoutedEventHandler
  • 対応するバブル イベントが CanExecute

適用対象

こちらもご覧ください