KeyboardEventHandler 委托

定义

表示将处理键盘相关路由事件的方法。Represents the method that will handle keyboard-related routed events.

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

参数

sender
Object

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

e
KeyboardEventArgs

事件数据。The event data.

继承
KeyboardEventHandler

注解

WPFWPF没有现有的KeyboardEventHandler键盘事件使用委托。No existing keyboard event in WPFWPF uses the KeyboardEventHandler delegate. KeyboardEventHandlerKeyboardEventArgs使用基类作为其事件数据类。KeyboardEventHandler uses the KeyboardEventArgs base class as its event data class. KeyboardEventArgs用作更具体KeyEventArgs的和KeyboardFocusChangedEventArgs事件数据类的基类。KeyboardEventArgs serves as the base class for the more specific KeyEventArgs and KeyboardFocusChangedEventArgs event data classes. 这些事件数据类由KeyEventHandlerKeyboardFocusChangedEventHandler委托使用, 而这些委托UIElement.KeyDown由现有WPFWPF事件 (例如和UIElement.LostKeyboardFocus) 使用。These event data classes are used by the KeyEventHandler and KeyboardFocusChangedEventHandler delegates, and those delegates are used by existing WPFWPF events such as UIElement.KeyDown and UIElement.LostKeyboardFocus.

扩展方法

GetMethodInfo(Delegate)

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

适用于

另请参阅