AccessKeyPressedEventHandler 代理人

定義

表示將處理 AccessKeyPressed 附加事件的方法。Represents the method that will handle the AccessKeyPressed attached event.

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

參數

sender
Object

附加事件處理常式的物件。The object where the event handler is attached.

e
AccessKeyPressedEventArgs

事件資料。The event data.

繼承
AccessKeyPressedEventHandler

備註

WPFWPF的存取金鑰是由管理員類別所處理, 其作用類似于存取金鑰的服務, 並將存取金鑰輸入轉送WPFWPF至輸入系統。Access keys in WPFWPF are handled by a manager class that acts somewhat like a service for access keys, and forwards access key input to the WPFWPF input system. 並不是藉由在特定物件上附加AccessKeyPressed附加事件的處理常式來明確地處理存取金鑰已按下的事件, 而是透過命令系結將存取金鑰與特定命令相關聯, 通常是較好的做法, 然後透過對應的路由事件處理路由命令。Rather than handling access key pressed events specifically by attaching a handler for the AccessKeyPressed attached event on a specific object, it is generally a better practice to associate the access key with a particular command through a command binding, and then handle the routed commands through the corresponding routed events. 這項技術可為使用者輸入提供統一的事件系統, 而不論起始輸入的輸入模式為何。This technique provides a unified event system for user input regardless of what input mode initiated the input. 如需詳細資訊, 請參閱輸入總覽For more information, see Input Overview.

擴充方法

GetMethodInfo(Delegate)

取得表示特定委派所代表之方法的物件。Gets an object that represents the method represented by the specified delegate.

適用於

另請參閱