AutomationElement.ClickablePointProperty Champ

Définition

Identifie la propriété relative au point interactif.

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 

Valeur de champ

Exemples

L’exemple suivant récupère la valeur actuelle de la propriété .

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

L’exemple suivant récupère la valeur actuelle de la propriété, mais spécifie que si l’élément lui-même ne fournit pas de valeur pour la propriété, NotSupported doit être retourné au lieu d’une valeur par défaut.

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

Remarques

Cet identificateur est utilisé par les applications clientes UI Automation. Les fournisseurs UI Automation doivent utiliser l’identificateur équivalent dans AutomationElementIdentifiers.

Un AutomationElement n’est pas cliquable s’il est complètement masqué par une autre fenêtre.

Les valeurs de retour de la propriété sont de type Point. La valeur par défaut est null.

La valeur retournée est exprimée en coordonnées d’écran physiques.

S’applique à

Voir aussi