AccessKey attached property
TOC
Collapse the table of content
Expand the table of content

AutomationProperties.AccessKey attached property

Gets or sets the access key for the specified element.


<object AutomationProperties.AccessKey="stringForKey" />

XAML Values

stringForKey

The access key string for the element.

Remarks

When getting this property in code, use GetAccessKey. When setting this property in code, use SetAccessKey.

An access key (sometimes referred to as a keyboard shortcut or mnemonic) is a character in the text of a menu, menu item, or label of a control such as a button that invokes the associated menu function. For example, to provide a shortcut way to open the File menu (for which the access key is typically "F"), an element might have this attached property set to "ALT+F".

Important  Setting this attached property does not automatically establish key-event handling for the string you specify. All the property does is enable you to notate (to assistive technologies) what the access key is. The actual key-handling behavior must be done separately, using general key-event handling code. For more info, see Keyboard interactions.
 

Requirements (Windows 10 device family)

Device family

API contract

Namespace

Windows.UI.Xaml.Automation

Metadata

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Automation

Metadata

Windows.winmd

See also

AutomationProperties

 

 

Show:
© 2017 Microsoft