public TextRange FindAttribute(TextAttributeId attribute, object value, bool backward) { var nativeValue = NativeValueConverter.ToNative(value); var nativeTextRange = ComCallWrapper.Call(() => NativeRange.FindAttribute(attribute.Id, nativeValue, backward.ToInt())); return(NativeValueConverter.NativeToManaged(Automation, nativeTextRange)); }
public TextRange GetCaretRange(out bool isActive) { var rawIsActive = 0; var nativeTextRange = ComCallWrapper.Call(() => ExtendedNativePattern.GetCaretRange(out rawIsActive)); isActive = (rawIsActive != 0); return(NativeValueConverter.NativeToManaged(Automation, nativeTextRange)); }
public TextRange RangeFromPoint(Point point) { var nativeRange = ComCallWrapper.Call(() => NativePattern.RangeFromPoint(point.ToTagPoint())); return(NativeValueConverter.NativeToManaged(Automation, nativeRange)); }
public TextRange RangeFromChild(Element child) { var nativeRange = ComCallWrapper.Call(() => NativePattern.RangeFromChild(child.NativeElement)); return(NativeValueConverter.NativeToManaged(Automation, nativeRange)); }
protected Element NativeElementToElement(PropertyId property) { var nativeElement = Get <UIA.IUIAutomationElement>(property); return(NativeValueConverter.NativeToManaged(AutomationElement.Automation, nativeElement)); }
public TextRange GetConversionTarget() { var nativeTextRange = ComCallWrapper.Call(() => ExtendedNativePattern.GetConversionTarget()); return(NativeValueConverter.NativeToManaged(Automation, nativeTextRange)); }
public TextRange FindText(string text, bool backward, bool ignoreCase) { var nativeTextRange = ComCallWrapper.Call(() => NativeRange.FindText(text, backward.ToInt(), ignoreCase.ToInt())); return(NativeValueConverter.NativeToManaged(Automation, nativeTextRange)); }
public TextRange Clone() { var clonedTextRangeNative = ComCallWrapper.Call(() => NativeRange.Clone()); return(NativeValueConverter.NativeToManaged(Automation, clonedTextRangeNative)); }
public TextRange2 AsTextRange2() { var nativeRange2 = (UIA.IUIAutomationTextRange2)NativeRange; return(NativeValueConverter.NativeToManaged(Automation, nativeRange2)); }
public Element GetEnclosingElement() { var nativeElement = ComCallWrapper.Call(() => NativeRange.GetEnclosingElement()); return(NativeValueConverter.NativeToManaged(Automation, nativeElement)); }
public TextRange RangeFromAnnotation(Element annotation) { var nativeElement = ComCallWrapper.Call(() => ExtendedNativePattern.RangeFromAnnotation(annotation.NativeElement)); return(NativeValueConverter.NativeToManaged(Automation, nativeElement)); }
/// <summary> /// Finds the first element which is in the given treescope and matches the condition /// </summary> public Element FindFirst(TreeScope treeScope, ConditionBase condition) { var nativeFoundElement = NativeElement.FindFirst((UIA.TreeScope)treeScope, NativeConditionConverter.ToNative(Automation, condition)); return(NativeValueConverter.NativeToManaged(Automation, nativeFoundElement)); }