AutomationElement.ClickablePointProperty Feld
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Identifies the clickable point property.
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
Feldwert
Beispiele
Im folgenden Beispiel wird der aktuelle Wert der Eigenschaft abgerufen.
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
Das folgende Beispiel ruft den aktuellen Wert der Eigenschaft ab, gibt jedoch an, dass, wenn das Element selbst keinen Wert für die Eigenschaft bereitstellt, NotSupported anstelle eines Standardwerts zurückgegeben werden soll.
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
Hinweise
Dieser Bezeichner wird von Benutzeroberflächenautomatisierung Clientanwendungen verwendet. Benutzeroberflächenautomatisierung Anbieter sollten den entsprechenden Bezeichner in AutomationElementIdentifiers verwenden.
Eine AutomationElement Option kann nicht geklickt werden, wenn sie von einem anderen Fenster vollständig verdeckt wird.
Rückgabewerte der Eigenschaft sind vom Typ Point. Der Standardwert ist null.
Der zurückgegebene Wert befindet sich in physischen Bildschirmkoordinaten.