KeyboardFocusChangedEventHandler KeyboardFocusChangedEventHandler KeyboardFocusChangedEventHandler KeyboardFocusChangedEventHandler Delegate

定义

表示将处理 LostKeyboardFocusGotKeyboardFocus 路由事件以及相关附加事件和预览事件的方法。Represents the method that will handle the LostKeyboardFocus and GotKeyboardFocus routed events, as well as related attached and Preview events.

public delegate void KeyboardFocusChangedEventHandler(System::Object ^ sender, KeyboardFocusChangedEventArgs ^ e);
public delegate void KeyboardFocusChangedEventHandler(object sender, KeyboardFocusChangedEventArgs e);
type KeyboardFocusChangedEventHandler = delegate of obj * KeyboardFocusChangedEventArgs -> unit
Public Delegate Sub KeyboardFocusChangedEventHandler(sender As Object, e As KeyboardFocusChangedEventArgs)

参数

sender
Object Object Object Object

事件处理程序所附加到的对象。The object where the event handler is attached.

继承
KeyboardFocusChangedEventHandlerKeyboardFocusChangedEventHandlerKeyboardFocusChangedEventHandlerKeyboardFocusChangedEventHandler

注解

此委托与以下附加事件一起使用:This delegate is used with the following attached events:

此委托还与基元素上的以下路由事件一起使用。This delegate is also used with the following routed events on base elements. 这些路由事件转发前面列出的附加事件, 使其更易于访问中WPFWPF的常规元素模型。These routed events forward the previously listed attached events to make them more accessible to the general element model in WPFWPF.

附加事件和基本元素路由事件共享其事件数据, 路由事件的冒泡和隧道版本也共享事件数据。The attached events and the base element routed events share their event data, and the bubbling and tunneling versions of the routed events also share event data. 这可能会影响事件在传输事件路由时的已处理特性。This can affect the handled characteristics of the event as it travels the event route. 有关详细信息, 请参阅输入概述For details, see Input Overview.

如果处理了Handled PreviewLostKeyboardFocus PreviewGotKeyboardFocus事件或事件 (在事件数据中设置true为), 键盘焦点将不会更改。If the PreviewGotKeyboardFocus event or the PreviewLostKeyboardFocus event is handled (Handled is set to true in the event data), keyboard focus will not change.

扩展方法

GetMethodInfo(Delegate) GetMethodInfo(Delegate) GetMethodInfo(Delegate) GetMethodInfo(Delegate)

获取指示指定委托表示的方法的对象。Gets an object that represents the method represented by the specified delegate.

适用于

另请参阅