UIAutomation.ExSpyCode.GetElementFromPoint C# (CSharp) Method

GetElementFromPoint() public static method

public static GetElementFromPoint ( System mousePoint ) : IUiElement
mousePoint System
return IUiElement
        public static IUiElement GetElementFromPoint(System.Drawing.Point mousePoint)
        {
            IUiElement element = null;
            // commented 20120618 to switch to UiaCOMWrapper
            element =
                UiElement.FromPoint(
                    new System.Windows.Point(mousePoint.X, mousePoint.Y));
            //element = 
            //    //(UiaNET::System.Windows.Automation.AutomationElement)
            //    UiaCOM3.UiaCOMHelper.GetAutomationElementFromPoint();
            
            return element;
        }