TableItemPattern.RowHeaderItemsProperty 필드

정의

테이블 항목 또는 셀과 연결된 모든 행 머리글을 검색하는 속성을 식별합니다.

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

필드 값

AutomationProperty

예제

다음 예제에서는 테이블의 기본 행 또는 열 머리글 항목을 나타내는 자동화 요소 개체의 배열을 검색 됩니다.

이 예제에서는 간의 관계를 위해는 RowOrColumnMajor 속성 행 및 열 머리글 항목에 대해서는 설명 합니다. 그러나 테이블 행 및 열 머리글에 관계 없이 있습니다를 RowOrColumnMajor 테이블의 속성입니다.

///--------------------------------------------------------------------
/// <summary>
/// Obtains an array of primary table headers.
/// </summary>
/// <param name="targetControl">
/// The target control of interest.
/// </param>
/// <param name="roworcolumnMajor">
/// The RowOrColumnMajor specifier.
/// </param>
/// <returns>
/// An AutomationElement array object.
/// </returns>
///--------------------------------------------------------------------
private Object GetPrimaryHeaders(
    AutomationElement targetControl, RowOrColumnMajor roworcolumnMajor)
{
    if (targetControl == null)
    {
        throw new ArgumentException("Target element cannot be null.");
    }

    try
    {
        if (roworcolumnMajor ==
            RowOrColumnMajor.RowMajor)
        {
            return targetControl.GetCurrentPropertyValue(
                TableItemPattern.RowHeaderItemsProperty);
        }

        if (roworcolumnMajor ==
            RowOrColumnMajor.ColumnMajor)
        {
            return targetControl.GetCurrentPropertyValue(
                TableItemPattern.ColumnHeaderItemsProperty);
        }
    }
    catch (InvalidOperationException)
    {
        // TableItemPattern not supported.
        // TO DO: error processing.
    }

    return null;
}
    '''--------------------------------------------------------------------
    ''' <summary>
    ''' Obtains an array of primary table headers.
    ''' </summary>
    ''' <param name="targetControl">
    ''' The target control of interest.
    ''' </param>
    ''' <param name="roworcolumnMajor">
    ''' The RowOrColumnMajor specifier.
    ''' </param>
    ''' <returns>
    ''' An AutomationElement array object.
    ''' </returns>
    '''--------------------------------------------------------------------
    Private Function GetPrimaryHeaders( _
    ByVal targetControl As AutomationElement, _
    ByVal roworcolumnMajor As RowOrColumnMajor) As [Object]
        If targetControl Is Nothing Then
            Throw New ArgumentException("Target element cannot be null.")
        End If

        Try
            If roworcolumnMajor = roworcolumnMajor.RowMajor Then
                Return targetControl.GetCurrentPropertyValue( _
                TableItemPattern.RowHeaderItemsProperty)
            End If

            If roworcolumnMajor = roworcolumnMajor.ColumnMajor Then
                Return targetControl.GetCurrentPropertyValue( _
                TableItemPattern.ColumnHeaderItemsProperty)
            End If
        Catch
        End Try
        ' TableItemPattern not supported.
        ' TO DO: error processing.

        Return Nothing

    End Function 'GetPrimaryHeaders
End Class

설명

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

이 속성에 없는 TableItemPattern.TableItemPatternInformation 를 사용 하 여 가져와야 하 GetCurrentPropertyValue 또는 GetCachedPropertyValue합니다.

적용 대상

추가 정보