Interface ITextPattern
The methods and properties used to interact with text.
public interface ITextPattern
Properties
Selection
The object’s selected text, or an empty string if no text is selected.
string Selection { get; }
Property Value
SupportedTextSelection
The type of text selection that is supported by the control.
SupportedTextSelection SupportedTextSelection { get; }
Property Value
Text
The object's text.
string Text { get; }
Property Value
VisibleText
The object's visible text.
string VisibleText { get; }
Property Value
Methods
ClearSelection()
Deselect all / any selected text from the object
void ClearSelection()
ScrollIntoView(int, TextUnit, Direction, Alignment)
Scrolls into view.
void ScrollIntoView(int numberOfUnits, TextUnit unitType = TextUnit.Line, Direction direction = Direction.Forward, Alignment alignment = Alignment.Top)
Parameters
numberOfUnitsint0-based index
unitTypeTextUnitThe unit type
directionDirectionThe direction of scrolling
alignmentAlignmentThe alignment
Select(int, int?)
Selects the specified text in the object.
void Select(int start, int? length = null)
Parameters
startintThe 0 based index position of the selection begin
lengthint?The number of characters to be selected. If not specified all remaining text will be selected
SelectAll()
Selects all of the object’s text.
void SelectAll()