Taal

AutomationElement.OrientationProperty Veld

Definitie

Identificeert de Orientation eigenschap.

public: static initonly System::Windows::Automation::AutomationProperty ^ OrientationProperty;
public static readonly System.Windows.Automation.AutomationProperty OrientationProperty;
 staticval mutable OrientationProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly OrientationProperty 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.

OrientationType orientationType = (OrientationType)
    autoElement.GetCurrentPropertyValue(AutomationElement.OrientationProperty);
Dim orientationType As OrientationType = _
    DirectCast(autoElement.GetCurrentPropertyValue(AutomationElement.OrientationProperty), _
    OrientationType)

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.

OrientationType orientationType1;
object orientationTypeNoDefault =
    autoElement.GetCurrentPropertyValue(AutomationElement.OrientationProperty, true);
if (orientationTypeNoDefault == AutomationElement.NotSupported)
{
    // TODO Handle the case where you do not wish to proceed using the default value.
}
else
{
    orientationType1 = (OrientationType)orientationTypeNoDefault;
}
Dim orientationType1 As OrientationType
Dim orientationTypeNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.OrientationProperty, True)
If orientationTypeNoDefault Is AutomationElement.NotSupported Then
    ' TODO Handle the case where you do not wish to proceed using the default value.
Else
    orientationType1 = DirectCast(orientationTypeNoDefault, OrientationType)
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.

De waarde van de eigenschap is van het type OrientationType. De standaardwaarde is None.

Van toepassing op

Zie ook