Cannot find System.Windows.Point
Asked Answered
M

2

7

I am using UIAutomation with the method

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

to get the element by the mouse cursor, but I cannot find the type System.Windows.Point. I looked up object library and it is still unseen.

I am using .Net Framework 4.5.

Marplot answered 4/10, 2014 at 0:7 Comment(3)
System.Windows.Point is part of WPF, if you're trying to do this in a WinForms app, it's not supported.Caseose
Add a reference to "WindowsBase".Heldentenor
@HansPassant can you please convert that comment into answer?Cocainize
M
0

System.Windows.Point is part of WPF, if you're trying to do this in a WinForms app, it's not supported – Peter Ritchie Oct 4 '14 at 0:10

Marplot answered 9/1, 2021 at 2:2 Comment(0)
S
0

As @HansPassant said, you have to add a reference to 'WindowsBase'. I am just adding the answer as the comment might go overlooked.

Sotelo answered 18/3, 2023 at 19:31 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.