UIElement.PreviewLostKeyboardFocus イベント
定義
この要素からキーボード フォーカスが離れたときに発生します。Occurs when the keyboard is no longer focused on this element.
public:
virtual event System::Windows::Input::KeyboardFocusChangedEventHandler ^ PreviewLostKeyboardFocus;
public event System.Windows.Input.KeyboardFocusChangedEventHandler PreviewLostKeyboardFocus;
member this.PreviewLostKeyboardFocus : System.Windows.Input.KeyboardFocusChangedEventHandler
Public Custom Event PreviewLostKeyboardFocus As KeyboardFocusChangedEventHandler
実装
注釈
このイベントではトンネリングルーティングが使用されるため、フォーカスを失った要素は、イベントハンドラーが実際にアタッチされている要素ではなく子要素になる場合があります。Because this event uses tunneling routing, the element that lost focus might be a child element instead of the element where the event handler is actually attached. イベントデータの Source を調べて、フォーカスを失った実際の要素を特定します。Check the Source in the event data to determine the actual element that lost focus.
このイベントは、このクラスの Keyboard.PreviewLostKeyboardFocus 添付イベントのエイリアスを作成し、UIElement が基本要素として継承されている場合に、PreviewLostKeyboardFocus がクラスメンバーリストの一部になるようにします。This event creates an alias for the Keyboard.PreviewLostKeyboardFocus attached event for this class, so that PreviewLostKeyboardFocus is part of the class members list when UIElement is inherited as a base element. PreviewLostKeyboardFocus イベントにアタッチされるイベントハンドラーは、基になる Keyboard.PreviewLostKeyboardFocus アタッチされるイベントにアタッチされ、同じイベントデータインスタンスを受け取ります。Event handlers that are attached to the PreviewLostKeyboardFocus event are attached to the underlying Keyboard.PreviewLostKeyboardFocus attached event and receive the same event data instance.
ルーティングされたイベント情報Routed Event Information
識別子フィールドIdentifier field | PreviewLostKeyboardFocusEvent |
ルーティング方法Routing strategy | トンネリングTunneling |
DelegateDelegate | KeyboardFocusChangedEventHandler |
対応するバブルイベントは LostKeyboardFocusです。The corresponding bubbling event is LostKeyboardFocus.
派生クラスでこのイベントのクラス処理を実装するには、OnPreviewLostKeyboardFocus をオーバーライドします。Override OnPreviewLostKeyboardFocus to implement class handling for this event in derived classes.