KeyboardEventHandler 委托

定义

表示将处理与键盘相关的路由事件的方法。

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

附加事件处理程序的对象。

e
KeyboardEventArgs

事件数据。

注解

WPF中没有现有键盘事件使用 KeyboardEventHandler 委托。 KeyboardEventHandler 使用 KeyboardEventArgs 基类作为其事件数据类。 KeyboardEventArgs 用作更具体 KeyEventArgsKeyboardFocusChangedEventArgs 事件数据类的基类。 这些事件数据类由 KeyEventHandlerKeyboardFocusChangedEventHandler 委托使用,这些委托由现有WPF事件(如 UIElement.KeyDownUIElement.LostKeyboardFocus)使用。

扩展方法

名称 说明
GetMethodInfo(Delegate)

获取一个对象,该对象表示由指定委托表示的方法。

适用于

另请参阅