AutomationElement.LocalizedControlTypeProperty 필드

정의

로컬 언어로 LocalizedControlType 속성을 식별합니다.

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

필드 값

예제

다음 예제에서는 속성의 현재 값을 검색합니다. 요소가 제공하지 않으면 기본값이 반환됩니다.

string localizedType =
    autoElement.GetCurrentPropertyValue(AutomationElement.LocalizedControlTypeProperty) as string;
Dim localizedType As String = _
    Cstr(autoElement.GetCurrentPropertyValue(AutomationElement.LocalizedControlTypeProperty))

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

string localizedType1;
object localizedTypeNoDefault =
    autoElement.GetCurrentPropertyValue(AutomationElement.LocalizedControlTypeProperty, true);
if (localizedTypeNoDefault == AutomationElement.NotSupported)
{
    localizedType1 = "Unknown type.";
}
else
{
    localizedType1 = localizedTypeNoDefault as string;
}
Dim localizedType1 As String
Dim localizedTypeNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.LocalizedControlTypeProperty, True)
If localizedTypeNoDefault Is AutomationElement.NotSupported Then
    localizedType1 = "Unknown type."
Else
    localizedType1 = CStr(localizedTypeNoDefault)
End If

설명

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

이 속성은 또는 Current 속성에서 Cached 검색할 수도 있습니다.

잘 정의된 컨트롤 형식이 없는 사용자 지정 컨트롤을 나타내는 경우 공급자가 이 속성을 노출해야 합니다.

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

적용 대상

추가 정보