다음을 통해 공유


GridItemPattern.RowSpanProperty 필드

정의

RowSpan 속성을 식별합니다.

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

필드 값

예제

다음 예제에서는 GridItemPattern 대상 컨트롤에서 가져온 개체를 현재 검색 하는 함수에 전달 GridItemPattern 속성 값입니다.

///--------------------------------------------------------------------
/// <summary>
/// Gets the current property values from target.
/// </summary>
/// <param name="gridItemPattern">
/// A GridItemPattern control pattern obtained from 
/// an automation element representing a target control.
/// </param>
/// <param name="automationProperty">
/// The automation property of interest.
/// </param>
/// <returns>
/// An integer object representing the requested property value.
/// </returns>
///--------------------------------------------------------------------
private object GetGridItemProperties(
    GridItemPattern gridItemPattern,
    AutomationProperty automationProperty)
{
    if (automationProperty.Id ==
        GridItemPattern.ColumnProperty.Id)
    {
        return gridItemPattern.Current.Column;
    }
    if (automationProperty.Id ==
        GridItemPattern.RowProperty.Id)
    {
        return gridItemPattern.Current.Row;
    }
    if (automationProperty.Id ==
        GridItemPattern.ColumnSpanProperty.Id)
    {
        return gridItemPattern.Current.ColumnSpan;
    }
    if (automationProperty.Id ==
        GridItemPattern.RowSpanProperty.Id)
    {
        return gridItemPattern.Current.RowSpan;
    }

    return null;
}
'''--------------------------------------------------------------------
''' <summary>
''' Gets the current property values from target.
''' </summary>
''' <param name="gridItemPattern">
''' A GridItemPattern control pattern obtained from 
''' an automation element representing a target control.
''' </param>
''' <param name="automationProperty">
''' The automation property of interest.
''' </param>
''' <returns>
''' An integer object representing the requested property value.
''' </returns>
'''--------------------------------------------------------------------
Private Function GetGridItemProperties( _
ByVal gridItemPattern As GridItemPattern, _
ByVal automationProperty As AutomationProperty) As Object
    If automationProperty.Id = gridItemPattern.ColumnProperty.Id Then
        Return gridItemPattern.Current.Column
    End If
    If automationProperty.Id = gridItemPattern.RowProperty.Id Then
        Return gridItemPattern.Current.Row
    End If
    If automationProperty.Id = gridItemPattern.ColumnSpanProperty.Id Then
        Return gridItemPattern.Current.ColumnSpan
    End If
    If automationProperty.Id = gridItemPattern.RowSpanProperty.Id Then
        Return gridItemPattern.Current.RowSpan
    End If

    Return Nothing

End Function 'GetGridItemProperties

설명

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

적용 대상