Cannot find System.Windows.Point

本文关键字:Point Windows System find Cannot | 更新日期: 2023-09-27 18:25:40

我正在使用方法的UIAutomation

System.Windows.Automation.AutomationElement.FromPoint(System.Windows.Point)

通过鼠标光标获取元素,但我找不到类型System.Windows.Point。我查了对象库,它仍然是看不见的。

我使用的是.Net Framework 4.5。

Cannot find System.Windows.Point

正如@HansPassant所说,您必须添加对"WindowsBase"的引用。我只是补充了答案,因为评论可能会被忽视。

System.Windows.Point是WPF的一部分,如果您试图在WinForms应用程序中执行此操作,则不支持它–Peter Ritchie 2014年10月4日0:10