KeyboardEventHandler 代理人

定義

代表要將處理鍵盤相關路由事件的方法。

C#
public delegate void KeyboardEventHandler(object sender, KeyboardEventArgs e);

參數

sender
Object

附加事件處理常式的物件。

e
KeyboardEventArgs

事件資料。

備註

WPF 中沒有現有的鍵盤事件會使用 KeyboardEventHandler 委派。 KeyboardEventHandler KeyboardEventArgs會使用基類做為其事件數據類別。 KeyboardEventArgs 做為更特定 KeyEventArgsKeyboardFocusChangedEventArgs 事件數據類別的基類。 這些事件資料類別由 KeyEventHandlerKeyboardFocusChangedEventHandler 委派使用,而這些委派則由現有的 WPF 事件使用,例如 UIElement.KeyDownUIElement.LostKeyboardFocus

擴充方法

GetMethodInfo(Delegate)

取得表示特定委派所代表之方法的物件。

適用於

產品 版本
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

另請參閱