UIElement.AccessKeyInvoked Event
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Occurs when a user completes an access key sequence.
// Register
event_token AccessKeyInvoked(TypedEventHandler<UIElement, AccessKeyInvokedEventArgs const&> const& handler) const;
// Revoke with event_token
void AccessKeyInvoked(event_token const* cookie) const;
// Revoke with event_revoker
UIElement::AccessKeyInvoked_revoker AccessKeyInvoked(auto_revoke_t, TypedEventHandler<UIElement, AccessKeyInvokedEventArgs const&> const& handler) const;
public event TypedEventHandler<UIElement,AccessKeyInvokedEventArgs> AccessKeyInvoked;
function onAccessKeyInvoked(eventArgs) { /* Your code */ }
uIElement.addEventListener("accesskeyinvoked", onAccessKeyInvoked);
uIElement.removeEventListener("accesskeyinvoked", onAccessKeyInvoked);
- or -
uIElement.onaccesskeyinvoked = onAccessKeyInvoked;
Public Custom Event AccessKeyInvoked As TypedEventHandler(Of UIElement, AccessKeyInvokedEventArgs)
<uiElement AccessKeyInvoked="eventhandler"/>
Device family |
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v3.0)
|
This event indicates that the action associated with the access key sequence should be invoked. For example, if an element’s AccessKey is "A" and the user presses Alt-A.
An access key can have one or several characters. This event occurs only when users type all the characters of an access key. For example, if an AccessKey value is "BC", the event doesn't occur when the user presses "B". The event occurs when the user presses "B", then "C".
This event occurs when the key is pressed, not when it's released.
Product | Versions |
---|---|
WinRT | Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |