Exemplo n.º 1
0
        public ITextRange FindAttribute(TextAttributeId attribute, object value, bool backward)
        {
            var nativeValue     = ValueConverter.ToNative(value);
            var nativeTextRange = ComCallWrapper.Call(() => NativeRange.FindAttribute(attribute.Id, nativeValue, backward.ToInt()));

            return(TextRangeConverter.NativeToManaged(Automation, nativeTextRange));
        }
Exemplo n.º 2
0
        public object GetAttributeValue(TextAttributeId attribute)
        {
            var nativeAttribute = UIA.AutomationTextAttribute.LookupById(attribute.Id);
            var nativeValue     = NativeRange.GetAttributeValue(nativeAttribute);

            return(attribute.Convert <object>(Automation, nativeValue));
        }
Exemplo n.º 3
0
        public ITextRange FindAttribute(TextAttributeId attribute, object value, bool backward)
        {
            var nativeValue     = ValueConverter.ToNative(value);
            var nativeAttribute = UIA.AutomationTextAttribute.LookupById(attribute.Id);
            var nativeTextRange = NativeRange.FindAttribute(nativeAttribute, nativeValue, backward);

            return(TextRangeConverter.NativeToManaged(Automation, nativeTextRange));
        }
Exemplo n.º 4
0
        public object GetAttributeValue(TextAttributeId attribute)
        {
            var nativeValue = ComCallWrapper.Call(() => NativeRange.GetAttributeValue(attribute.Id));

            return(attribute.Convert <object>(nativeValue));
        }
Exemplo n.º 5
0
        public object GetAttributeValue(TextAttributeId attribute)
        {
            var nativeValue = Com.Call(() => NativeRange.GetAttributeValue(attribute.Id));

            return(attribute.Convert <object>(Automation, nativeValue));
        }