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 요소에 의해 가려지는 경우가 포함됩니다.

적용 대상

추가 정보