AutomationElement.IsControlElementProperty Veld

Definitie

Identificeert de IsControlElement eigenschap.

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

Waarde van veld

Voorbeelden

In het volgende voorbeeld wordt de huidige waarde van de eigenschap opgehaald. De standaardwaarde wordt geretourneerd als het element er geen opgeeft.

bool isControl = (bool)
   autoElement.GetCurrentPropertyValue(AutomationElement.IsControlElementProperty);
Dim isControl As Boolean = CBool(autoElement.GetCurrentPropertyValue(AutomationElement.IsControlElementProperty))

In het volgende voorbeeld wordt de huidige waarde van de eigenschap opgehaald, maar wordt aangegeven dat als het element zelf geen waarde voor de eigenschap biedt, NotSupported moet worden geretourneerd in plaats van een standaardwaarde.

bool isControl1;
object isControlNoDefault =
    autoElement.GetCurrentPropertyValue(AutomationElement.IsControlElementProperty, true);
if (isControlNoDefault == AutomationElement.NotSupported)
{
    // TODO Handle the case where you do not wish to proceed using the default value.
}
else
{
    isControl1 = (bool)isControlNoDefault;
}
Dim isControl1 As Boolean
Dim isControlNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.IsControlElementProperty, True)
If isControlNoDefault Is AutomationElement.NotSupported Then
    ' TODO Handle the case where you do not wish to proceed using the default value.
Else
    isControl1 = CBool(isControlNoDefault)
End If

Opmerkingen

Deze id wordt gebruikt door UI Automation clienttoepassingen. UI Automation providers moeten de equivalente id in AutomationElementIdentifiers gebruiken.

Deze eigenschap kan ook worden opgehaald uit de Current of Cached eigenschappen.

Besturingselementen zijn elementen die een gebruiker als interactief beschouwt of informatie bevat in de gebruikersinterface.

Retourwaarden van de eigenschap zijn van het type Boolean. De standaardwaarde voor de eigenschap is true.

Van toepassing op

Zie ook