GridItemPattern.RowProperty Field
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Identifies the Row property.
public: static initonly System::Windows::Automation::AutomationProperty ^ RowProperty;
public static readonly System.Windows.Automation.AutomationProperty RowProperty;
staticval mutable RowProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly RowProperty As AutomationProperty
Field Value
Examples
In the following example, a GridItemPattern object obtained from a target control is passed into a function that retrieves the current GridItemPattern property values.
///--------------------------------------------------------------------
/// <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
Remarks
This identifier is used by UI Automation client applications. UI Automation providers should use the equivalent field in GridItemPatternIdentifiers.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET