AutomationElement.NativeWindowHandleProperty 필드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
속성을 식별합니다 NativeWindowHandle .
public: static initonly System::Windows::Automation::AutomationProperty ^ NativeWindowHandleProperty;
public static readonly System.Windows.Automation.AutomationProperty NativeWindowHandleProperty;
staticval mutable NativeWindowHandleProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly NativeWindowHandleProperty As AutomationProperty
필드 값
예제
다음 예제에서는 속성의 현재 값을 검색합니다. 요소가 제공하지 않으면 기본값이 반환됩니다.
int nativeHandle = (int)
autoElement.GetCurrentPropertyValue(AutomationElement.NativeWindowHandleProperty);
Dim nativeHandle As Integer = _
CInt(autoElement.GetCurrentPropertyValue(AutomationElement.NativeWindowHandleProperty))
다음 예제에서는 속성의 현재 값을 검색하지만 요소 자체가 속성 NotSupported 에 대한 값을 제공하지 않는 경우 기본값 대신 반환되도록 지정합니다.
int nativeHandle1;
object nativeHandleNoDefault =
autoElement.GetCurrentPropertyValue(AutomationElement.NativeWindowHandleProperty, true);
if (nativeHandleNoDefault == AutomationElement.NotSupported)
{
// TODO Handle the case where you do not wish to proceed using the default value.
}
else
{
nativeHandle1 = (int)nativeHandleNoDefault;
}
Dim nativeHandle1 As Integer
Dim nativeHandleNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.NativeWindowHandleProperty, True)
If nativeHandleNoDefault Is AutomationElement.NotSupported Then
' TODO Handle the case where you do not wish to proceed using the default value.
Else
nativeHandle1 = CInt(nativeHandleNoDefault)
End If
설명
이 식별자는 UI 자동화 클라이언트 애플리케이션에서 사용됩니다. UI 자동화 공급자는 AutomationElementIdentifiers 해당 식별자를 사용해야 합니다.
이 속성은 또는 Current 속성에서 Cached 검색할 수도 있습니다.
속성의 반환 값은 형식 Int32입니다. 속성의 기본값은 0입니다.