AutomationElement.ClickablePointProperty Field


Identifies the clickable point property.

Namespace:   System.Windows.Automation
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

Public Shared ReadOnly ClickablePointProperty As AutomationProperty

This identifier is used by UI Automation client applications. UI Automation providers should use the equivalent identifier in AutomationElementIdentifiers.

An AutomationElement is not clickable if it is completely obscured by another window.

Return values of the property are of type Point. The default value is null.

The value returned is in physical screen coordinates.

The following example retrieves the current value of the property.

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

The following example retrieves the current value of the property, but specifies that if the element itself does not provide a value for the property, NotSupported is to be returned instead of a default value.

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.
    clickablePoint1 = DirectCast(clickablePointNoDefault, System.Windows.Point)
End If

.NET Framework
Available since 3.0
Return to top