AutomationElement.AutomationElementInformation.AccessKey 屬性

定義

取得的字串包含項目的便捷鍵字元。Gets a string containing the access key character for the element.

public:
 property System::String ^ AccessKey { System::String ^ get(); };
public string AccessKey { get; }
member this.AccessKey : string
Public ReadOnly Property AccessKey As String

屬性值

String

與項目關聯的字元,用以啟動該項目。The character, associated with an element, that is used to activate that element.

備註

存取金鑰是功能表、功能表項目或控制項標籤的文字中的字元,例如啟用附加功能表功能的按鈕。An access key is a character in the text of a menu, menu item, or label of a control such as a button that activates the attached menu function. 例如,字母 "O" 通常用來從 檔案功能表叫用 [ 開啟 檔案] 通用對話方塊。For example, the letter "O" is often used to invoke the Open file common dialog box from a File menu. 具有便捷鍵屬性集的消費者介面自動化元素一律會實作為 InvokePattern 類別。UI Automation elements that have the access key property set always implement the InvokePattern class.

如需詳細資訊,請參閱AccessKeyPropertyFor more information, see AccessKeyProperty.

適用於