UIElement.LostKeyboardFocus 事件

定義

鍵盤不再以此項目為焦點時發生。Occurs when the keyboard is no longer focused on this element,.

public:
 virtual event System::Windows::Input::KeyboardFocusChangedEventHandler ^ LostKeyboardFocus;
public event System.Windows.Input.KeyboardFocusChangedEventHandler LostKeyboardFocus;
member this.LostKeyboardFocus : System.Windows.Input.KeyboardFocusChangedEventHandler 
Public Custom Event LostKeyboardFocus As KeyboardFocusChangedEventHandler 

事件類型

KeyboardFocusChangedEventHandler

實作

備註

因為此事件使用反升路由,所以遺失焦點的元素可能是子項目,而不是實際附加事件處理常式的專案。Because this event uses bubbling 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.LostKeyboardFocus 會為這個類別建立附加事件的別名,因此 LostKeyboardFocusUIElement 繼承為基底專案時,它就是類別成員清單的一部分。This event creates an alias for the Keyboard.LostKeyboardFocus attached event for this class, so that LostKeyboardFocus is part of the class members list when UIElement is inherited as a base element. 附加至事件的事件處理常式 LostKeyboardFocus 會附加至基礎 Keyboard.LostKeyboardFocus 附加事件,並接收相同的事件資料實例。Event handlers that are attached to the LostKeyboardFocus event are attached to the underlying Keyboard.LostKeyboardFocus attached event and receive the same event data instance.

路由事件資訊Routed Event Information

識別碼欄位Identifier field LostKeyboardFocusEvent
路由策略Routing strategy 鼓 泡Bubbling
代理人Delegate KeyboardFocusChangedEventHandler

適用於