AutomationElement.AcceleratorKeyProperty 필드

정의

AcceleratorKey 속성을 식별합니다.

public: static initonly System::Windows::Automation::AutomationProperty ^ AcceleratorKeyProperty;
public static readonly System.Windows.Automation.AutomationProperty AcceleratorKeyProperty;
 staticval mutable AcceleratorKeyProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly AcceleratorKeyProperty As AutomationProperty 

필드 값

예제

다음 예제에서는 속성의 현재 값을 검색 합니다. 요소 하나를 제공 하지 않는 경우 기본값 반환 됩니다.

string acceleratorKey = 
    autoElement.GetCurrentPropertyValue(AutomationElement.AcceleratorKeyProperty) as string;
Dim acceleratorKey As String = _
    CStr(autoElement.GetCurrentPropertyValue(AutomationElement.AcceleratorKeyProperty))

다음 예제에서는 속성의 현재 값을 검색 하지만 요소 자체의 속성에 대 한 값을 제공 하지 않는 경우 지정 NotSupported 대신 기본값을 반환 하는 것입니다.

string acceleratorKeyString;
object acceleratorKeyNoDefault =
    autoElement.GetCurrentPropertyValue(AutomationElement.AcceleratorKeyProperty, true);
if (acceleratorKeyNoDefault == AutomationElement.NotSupported)
{
    // TODO Handle the case where you do not wish to proceed using the default value.
}
else
{
    acceleratorKeyString = acceleratorKeyNoDefault as string;
}
Dim acceleratorKeyString As String
Dim acceleratorKeyNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.AcceleratorKeyProperty, True)
If acceleratorKeyNoDefault Is AutomationElement.NotSupported Then
    ' TODO Handle the case where you do not wish to proceed using the default value.
Else
    acceleratorKeyString = CStr(acceleratorKeyNoDefault)
End If

설명

이 식별자는 UI 자동화 클라이언트 애플리케이션에서 사용 됩니다. UI 자동화 공급자에서 해당 식별자를 사용 해야 AutomationElementIdentifiers합니다.

이 속성을 검색할 수도 있습니다는 Current 또는 Cached 속성입니다.

액셀러레이터 키 조합 작업을 호출 합니다. 예를 들어, CTRL + O는 대개 호출 하는 열려 파일 일반 대화 상자. AutomationElement 에 액셀러레이터 키 속성을 설정 한다고 항상 구현 된 InvokePattern 클래스입니다.

반환 형식이 속성의 값은 String합니다. 속성의 기본값은 빈 문자열입니다.

적용 대상

추가 정보