AutomationElement.ClickablePointProperty Campo
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Identifica a propriedade do ponto clicável.
public: static initonly System::Windows::Automation::AutomationProperty ^ ClickablePointProperty;
public static readonly System.Windows.Automation.AutomationProperty ClickablePointProperty;
staticval mutable ClickablePointProperty : System.Windows.Automation.AutomationProperty
Public Shared ReadOnly ClickablePointProperty As AutomationProperty
Valor de Campo
Exemplos
O exemplo seguinte recupera o valor atual da propriedade.
System.Windows.Point clickablePoint = new System.Windows.Point(-1,-1);
object prop = autoElement.GetCurrentPropertyValue(AutomationElement.ClickablePointProperty);
// Do not attempt to cast prop if it is null.
if (prop is System.Windows.Point)
{
clickablePoint = (System.Windows.Point)prop;
}
Dim clickablePoint As New System.Windows.Point(- 1, - 1)
Dim prop As Object = autoElement.GetCurrentPropertyValue(AutomationElement.ClickablePointProperty)
' Do not attempt to cast prop if it is null.
If TypeOf prop Is System.Windows.Point Then
clickablePoint = DirectCast(prop, System.Windows.Point)
End If
O exemplo seguinte recupera o valor atual da propriedade, mas especifica que, se o próprio elemento não fornecer um valor para a propriedade, NotSupported deve ser devolvido em vez de um valor padrão.
System.Windows.Point clickablePoint1;
object clickablePointNoDefault =
autoElement.GetCurrentPropertyValue(AutomationElement.ClickablePointProperty, true);
if (clickablePointNoDefault == AutomationElement.NotSupported)
{
// TODO Handle the case where you do not wish to proceed using the default value.
}
else
{
clickablePoint1 = (System.Windows.Point)clickablePointNoDefault;
}
Dim clickablePoint1 As System.Windows.Point
Dim clickablePointNoDefault As Object = autoElement.GetCurrentPropertyValue(AutomationElement.ClickablePointProperty, True)
If clickablePointNoDefault Is AutomationElement.NotSupported Then
' TODO Handle the case where you do not wish to proceed using the default value.
Else
clickablePoint1 = DirectCast(clickablePointNoDefault, System.Windows.Point)
End If
Observações
Este identificador é utilizado por aplicações clientes de Automatização da Interface de Utilizador. Automatização da Interface de Utilizador fornecedores devem usar o identificador equivalente em AutomationElementIdentifiers.
An AutomationElement não é clicável se estiver completamente oculto por outra janela.
Os valores de retorno da propriedade são do tipo Point. O valor predefinido é null.
O valor devolvido está em coordenadas físicas do ecrã.