TextPatternRange.FindText Method (String, Boolean, Boolean)

 

Returns a text range subset that contains the specified text.

Namespace:   System.Windows.Automation.Text
Assembly:  UIAutomationClient (in UIAutomationClient.dll)

member FindText : 
        text:string *
        backward:bool *
        ignoreCase:bool -> TextPatternRange

Parameters

text
Type: System.String

The text string to search for.

backward
Type: System.Boolean

true if the last occurring text range should be returned instead of the first; otherwise false.

ignoreCase
Type: System.Boolean

true if case should be ignored; otherwise false.

Return Value

Type: System.Windows.Automation.Text.TextPatternRange

A text range matching the specified text; otherwise null (Nothing in Microsoft Visual Basic .NET). 

There is no differentiation between hidden and visible text. UI Automation clients can use IsHiddenAttribute to check text visibility.

System_CAPS_noteNote

Use DocumentRange to search the entire document.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.0
Return to top
Show: