UIElement.AccessKeyInvoked 事件

定義

發生于使用者完成存取金鑰序列時。

// 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"/>

事件類型

備註

這個事件表示應該叫用與存取金鑰序列相關聯的動作。 例如,如果專案的 AccessKey 為 「A」,且使用者按下 Alt-A。

便捷鍵可以有一或數個字元。 只有當使用者輸入存取金鑰的所有字元時,才會發生此事件。 例如,如果 AccessKey 值為 「BC」,當使用者按下 「B」 時,就不會發生此事件。 當使用者按下 「B」、「C」 時,就會發生此事件。

按下按鍵時,而不是放開按鍵時,就會發生此事件。

適用於

另請參閱