AutomationElement.ClickablePointProperty Campo

Definición

Identifica la propiedad del punto seleccionable.

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

Ejemplos

En el ejemplo siguiente se recupera el valor actual de la propiedad .

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

En el ejemplo siguiente se recupera el valor actual de la propiedad , pero se especifica que si el propio elemento no proporciona un valor para la propiedad , NotSupported se devolverá en lugar de un valor predeterminado.

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

Comentarios

Las aplicaciones cliente de Automatización de la interfaz de usuario usan este identificador. Los proveedores de automatización de la interfaz de usuario deben usar el identificador equivalente en AutomationElementIdentifiers.

Un AutomationElement no se puede hacer clic si está completamente oculto por otra ventana.

Los valores devueltos de la propiedad son de tipo Point. El valor predeterminado es null.

El valor devuelto está en coordenadas de pantalla físicas.

Se aplica a

Consulte también