TextGetOptions TextGetOptions TextGetOptions TextGetOptions TextGetOptions Enum


Specifies options for retrieving the text in a document or text range.

This enumeration has a System.FlagsAttribute attribute that allows a bitwise combination of its member values.

public : enum class TextGetOptions
enum class winrt::Windows::UI::Text::TextGetOptions : uint32_t
public enum TextGetOptions
Public Enum TextGetOptions
var value = Windows.UI.Text.TextGetOptions.adjustCrlf;
System.FlagsAttribute ContractVersionAttribute
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


AdjustCrlf AdjustCrlf AdjustCrlf AdjustCrlf AdjustCrlf

If the starting character position is in the middle of a construct such as a CRLF (U+000D U+000A), surrogate pair, variation-selector sequence, or table-row delimiter, move to the beginning of the construct.

AllowFinalEop AllowFinalEop AllowFinalEop AllowFinalEop AllowFinalEop

Allow retrieving the final end-of-paragraph (EOP) if it’s included in the range. This EOP exists in all rich-text controls and cannot be deleted. It does not exist in plain-text controls.

FormatRtf FormatRtf FormatRtf FormatRtf FormatRtf

Retrieve Rich Text Format (RTF) instead of plain text. Rich Text Format (RTF) is a BYTE (8-bit) format, but because ITextRange.GetText returns a string, the Rich Text Format (RTF) is returned as WCHARs (16-bit or UTF-16), not bytes, when you call ITextRange.GetText with the FormatRtf value. When you call ITextRange.SetText with FormatRtf, the method accepts an string containing either bytes or WCHARs, but other Rich Text Format (RTF) readers only understand bytes.

IncludeNumbering IncludeNumbering IncludeNumbering IncludeNumbering IncludeNumbering

Include list numbers.

NoHidden NoHidden NoHidden NoHidden NoHidden

Don't include hidden text.

None None None None None

None of the following options is used.

UseCrlf UseCrlf UseCrlf UseCrlf UseCrlf

Use carriage return/line feed (CR/LF) in place of a carriage return.

UseLf UseLf UseLf UseLf UseLf

Use line feed (LF) in place of all carriage returns.

UseObjectText UseObjectText UseObjectText UseObjectText UseObjectText

Retrieve text including the alternate text for the images in the range.


If both UseLf and UseCrLf are used an invalid argument exception is thrown.