public override void UnregisterAllEvents() { try { NativeAutomation.RemoveAllEventHandlers(); } catch { } }
/// <summary> /// Creates an <see cref="Element"/> from a given point /// </summary> public Element FromPoint(Point point) { var nativeElement = NativeAutomation.ElementFromPoint(point.ToTagPoint()); return(nativeElement == null ? null : new Element(this, nativeElement)); }
/// <summary> /// Creates an <see cref="Element"/> from a given windows handle (HWND) /// </summary> public Element FromHandle(IntPtr hwnd) { var nativeElement = NativeAutomation.ElementFromHandle(hwnd); return(nativeElement == null ? null : new Element(this, nativeElement)); }
/// <summary> /// Gets the root element (desktop) /// </summary> public Element GetDesktop() { var desktop = NativeAutomation.GetRootElement(); return(new Element(this, desktop)); }