MultipleViewPattern.Pattern Feld

Definition

Bezeichnet das MultipleViewPattern-Steuerelementmuster.

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

Feldwert

AutomationPattern

Beispiele

Im folgenden Beispiel wird ein MultipleViewPattern Steuerelementmuster aus einem AutomationElement.

///--------------------------------------------------------------------
/// <summary>
/// Obtains a MultipleViewPattern control pattern from an 
/// automation element.
/// </summary>
/// <param name="targetControl">
/// The automation element of interest.
/// </param>
/// <returns>
/// A MultipleViewPattern object.
/// </returns>
///--------------------------------------------------------------------
private MultipleViewPattern GetMultipleViewPattern(
    AutomationElement targetControl)
{
    MultipleViewPattern multipleViewPattern = null;

    try
    {
        multipleViewPattern =
            targetControl.GetCurrentPattern(
            MultipleViewPattern.Pattern)
            as MultipleViewPattern;
    }
    // Object doesn't support the MultipleViewPattern control pattern
    catch (InvalidOperationException)
    {
        return null;
    }

    return multipleViewPattern;
}
'/--------------------------------------------------------------------
'/ <summary>
'/ Obtains a MultipleViewPattern control pattern from an 
'/ automation element.
'/ </summary>
'/ <param name="targetControl">
'/ The automation element of interest.
'/ </param>
'/ <returns>
'/ A MultipleViewPattern object.
'/ </returns>
'/--------------------------------------------------------------------
Private Function GetMultipleViewPattern( _
ByVal targetControl As AutomationElement) As MultipleViewPattern
    Dim multipleViewPattern As MultipleViewPattern = Nothing

    Try
        multipleViewPattern = DirectCast( _
        targetControl.GetCurrentPattern(multipleViewPattern.Pattern), _
        MultipleViewPattern)
    Catch exc As InvalidOperationException
        'Object doesn't support the MultipleViewPattern control pattern
        Return Nothing
    End Try

    Return multipleViewPattern
End Function 'GetMultipleViewPattern

Hinweise

Dieser Bezeichner wird von Benutzeroberflächenautomatisierung Clientanwendungen verwendet. Benutzeroberflächenautomatisierung Anbieter sollten das entsprechende Feld in MultipleViewPatternIdentifiersverwenden.

Der Musterbezeichner wird an Methoden übergeben, zGetCurrentPattern. B. zum Abrufen des Steuerelementmusters von Interesse aus dem angegebenen .AutomationElement

Gilt für