ContentElement.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 

事件类型

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 此类创建附加事件的别名,因此 PreviewLostKeyboardFocusContentElement 继承为基元素时,它是类成员列表的一部分。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 ContentElement 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
委托Delegate KeyboardFocusChangedEventHandler

适用于

另请参阅