ITextRangeProvider.GetText Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Retrieves the plain text of the range.
Assembly: System.Windows (in System.Windows.dll)
Parameters
- maxLength
- Type: System.Int32
The maximum length of the string to return. Use -1 to specify an unlimited length.
Return Value
Type: System.StringThe plain text of the text range, which might represent a portion of the full string truncated at the specified maxLength.
| Exception | Condition |
|---|---|
| ArgumentOutOfRangeException | maxLength is less than -1. |
GetText considersboth hidden and visible text.
If maxLength is greater than the length of the text span of the caller, the returned string is the plain text of the text range.
GetText is unaffected by the order of endpoints in the text flow; it always returns the text from the Start through the End endpoints of the text range, in the logical order of the text flow.