AutomationElement.BoundingRectangleProperty 필드

정의

BoundingRectangle 속성을 식별합니다.

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

필드 값

예제

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

System.Windows.Rect boundingRect = (System.Windows.Rect)
    autoElement.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty);
Dim boundingRect As System.Windows.Rect = CType(autoElement.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty), System.Windows.Rect)

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

System.Windows.Rect boundingRect1;
object boundingRectNoDefault =
    autoElement.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty, true);
if (boundingRectNoDefault == AutomationElement.NotSupported)
{
    // TODO Handle the case where you do not wish to proceed using the default value.
}
else
{
    boundingRect1 = (System.Windows.Rect)boundingRectNoDefault;
}
Dim boundingRect1 As System.Windows.Rect
Dim boundingRectNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.BoundingRectangleProperty, True)
If boundingRectNoDefault Is AutomationElement.NotSupported Then
    ' TODO Handle the case where you do not wish to proceed using the default value.
Else
    boundingRect1 = DirectCast(boundingRectNoDefault, System.Windows.Rect)
End If

설명

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

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

경계 사각형은 형식의 Rect합니다. 반환 된 사각형은 실제 화면 좌표입니다. 기본값은 Empty입니다. Empty 항목이 현재 UI(사용자 인터페이스)를 표시하지 않는 경우 가 반환됩니다.

반환 된 사각형을 클릭할 수 없는 요소를 포함할 수 있습니다. 이 문제가 발생할 수 있는 인스턴스에는 UI 항목에 불규칙한 모양 또는 클릭 가능한 영역이 있거나 다른 UI 요소로 가려져 있는 경우가 포함됩니다.

적용 대상

추가 정보