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.

适用于

另请参阅