AutomationPattern 클래스

정의

컨트롤 패턴을 식별합니다.

public ref class AutomationPattern : System::Windows::Automation::AutomationIdentifier
public class AutomationPattern : System.Windows.Automation.AutomationIdentifier
type AutomationPattern = class
    inherit AutomationIdentifier
Public Class AutomationPattern
Inherits AutomationIdentifier
상속
AutomationPattern

예제

다음 예제에서는 표시 합니다 ProgrammaticName 에서 지 원하는 패턴의는 AutomationElement합니다.

다음 예제에서는 특정 패턴을 요청 하는 방법을 보여 줍니다.

/// <summary>
/// Retrieves the selection container for a selection item.
/// </summary>
/// <param name="listItem">
/// An element that supports SelectionItemPattern.
/// </param>
AutomationElement GetListItemParent(AutomationElement listItem)
{
    if (listItem == null) throw new ArgumentException();
    SelectionItemPattern pattern = listItem.GetCurrentPattern(SelectionItemPattern.Pattern) as SelectionItemPattern;
    if (pattern == null)
    {
        return null;
    }
    else
    {
        SelectionItemPattern.SelectionItemPatternInformation properties = pattern.Current;
        return properties.SelectionContainer;
    }
}
''' <summary>
''' Retrieves the selection container for a selection item.
''' </summary>
''' <param name="listItem">
''' An element that supports SelectionItemPattern.
''' </param>
Function GetListItemParent(ByVal listItem As AutomationElement) As AutomationElement
    If listItem Is Nothing Then
        Throw New ArgumentException()
    End If
    Dim pattern As SelectionItemPattern = _
        DirectCast(listItem.GetCurrentPattern(SelectionItemPattern.Pattern), SelectionItemPattern)
    If pattern Is Nothing Then
        Return Nothing
    Else
        Dim properties As SelectionItemPattern.SelectionItemPatternInformation = pattern.Current
        Return properties.SelectionContainer
    End If

End Function 'GetListItemParent

설명

이 형식의 인스턴스는 특정 컨트롤 패턴을 식별 합니다. 예를 들어 합니다 DockPattern.Pattern 식별 하는 필드는 DockPattern 컨트롤 패턴.

속성

Id

내부 숫자 식별자를 가져옵니다.

(다음에서 상속됨 AutomationIdentifier)
ProgrammaticName

등록된 프로그래밍 이름을 가져옵니다.

(다음에서 상속됨 AutomationIdentifier)

메서드

CompareTo(Object)

AutomationIdentifier를 다른 AutomationIdentifier와 비교합니다.

(다음에서 상속됨 AutomationIdentifier)
Equals(Object)

지정된 AutomationIdentifier가 이 AutomationIdentifier와 같은지 여부를 나타내는 값을 반환합니다.

(다음에서 상속됨 AutomationIdentifier)
GetHashCode()

이 UI 자동화 식별자에 대한 해시 코드를 반환합니다.

(다음에서 상속됨 AutomationIdentifier)
GetType()

현재 인스턴스의 Type을 가져옵니다.

(다음에서 상속됨 Object)
LookupById(Int32)

지정된 숫자 식별자를 캡슐화하는 AutomationPattern를 검색합니다.

MemberwiseClone()

현재 Object의 단순 복사본을 만듭니다.

(다음에서 상속됨 Object)
ToString()

현재 개체를 나타내는 문자열을 반환합니다.

(다음에서 상속됨 Object)

적용 대상

추가 정보