AutomationElement.TryGetClickablePoint(Point) 方法

定义

检索元素内一个可单击的点。

public:
 bool TryGetClickablePoint([Runtime::InteropServices::Out] System::Windows::Point % pt);
public bool TryGetClickablePoint (out System.Windows.Point pt);
member this.TryGetClickablePoint : Point -> bool
Public Function TryGetClickablePoint (ByRef pt As Point) As Boolean

参数

pt
Point

此方法返回时,将包含一个可单击点的物理屏幕坐标。

返回

Boolean

如果没有可单击的点,为 true;否则为 false

示例

以下示例尝试检索一个可单击点。AutomationElement

// element is an AutomationElement.
System.Windows.Point pt;
bool clickable = element.TryGetClickablePoint(out pt);
' element is an AutomationElement.
Dim pt As System.Windows.Point
Dim clickable As Boolean = element.TryGetClickablePoint(pt)

注解

AutomationElement如果它被另一个窗口完全遮盖,则不可单击。

适用于

另请参阅