AutomationElement.ClickablePointProperty Veld
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Identificeert de klikbare punteigenschap.
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
Waarde van veld
Voorbeelden
In het volgende voorbeeld wordt de huidige waarde van de eigenschap opgehaald.
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
In het volgende voorbeeld wordt de huidige waarde van de eigenschap opgehaald, maar wordt aangegeven dat als het element zelf geen waarde voor de eigenschap biedt, NotSupported moet worden geretourneerd in plaats van een standaardwaarde.
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
Opmerkingen
Deze id wordt gebruikt door UI Automation clienttoepassingen. UI Automation providers moeten de equivalente id in AutomationElementIdentifiers gebruiken.
Een AutomationElement is niet klikbaar als het volledig wordt bedekt door een ander venster.
Retourwaarden van de eigenschap zijn van het type Point. De standaardwaarde is null.
De geretourneerde waarde bevindt zich in fysieke schermcoƶrdinaten.