-api-id | -api-type |
---|---|
T:Windows.UI.Text.TextGetOptions |
winrt enum |
Specifies options for retrieving the text in a document or text range.
None of the following options is used.
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.
Use carriage return/line feed (CR/LF) in place of a carriage return.
Retrieve text including the alternate text for the images in the range.
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.
-field NoHidden:32
Don't include hidden text.
Include list numbers.
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.
Use line feed (LF) in place of all carriage returns.
If both UseLf and UseCrLf are used an invalid argument exception is thrown.
Windows version | SDK version | Value added |
---|---|---|
1703 | 15063 | UseLf |
ITextDocument.GetText, ITextDocument.SaveToStream, ITextRange.GetTextViaStream, ITextRange.SetTextViaStream, ITextRange.GetText