GridItemPattern.RowSpanProperty Campo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Identifica la proprietà 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
Valore del campo
Esempio
Nell'esempio seguente viene passato un GridItemPattern oggetto ottenuto da un controllo di destinazione in una funzione che recupera i valori correnti GridItemPattern della proprietà.
///--------------------------------------------------------------------
/// <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
Commenti
Questo identificatore viene usato da Automazione interfaccia utente applicazioni client. Automazione interfaccia utente provider devono usare il campo equivalente in GridItemPatternIdentifiers.