AutomationElement.OrientationProperty Campo

Definição

Identifica a propriedade Orientation.

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 

Valor do campo

Exemplos

O exemplo a seguir recupera o valor atual da propriedade . O valor padrão será retornado se o elemento não fornecer um.

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

O exemplo a seguir recupera o valor atual da propriedade, mas especifica que, se o próprio elemento não fornecer um valor para a propriedade, NotSupported deverá ser retornado em vez de um valor padrão.

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

Comentários

Esse identificador é usado por aplicativos cliente da Automação da Interface do Usuário. Os provedores de Automação da Interface do Usuário devem usar o identificador equivalente em AutomationElementIdentifiers.

Essa propriedade também pode ser recuperada das Current propriedades ou Cached .

O valor da propriedade é do tipo OrientationType. O valor padrão é None.

Aplica-se a

Confira também