ITextDocument Interface

Definition

Provides access to the content of a document, providing a way to load and save the document to a stream, retrieve text ranges, get the active selection, set default formatting attributes, and so on.

public interface class ITextDocument
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.Guid(3203288539, 37042, 16524, 162, 246, 10, 10, 195, 30, 51, 228)]
struct ITextDocument
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.Guid(3203288539, 37042, 16524, 162, 246, 10, 10, 195, 30, 51, 228)]
public interface ITextDocument
Public Interface ITextDocument
Derived
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Properties

CaretType

Gets or sets the caret type.

DefaultTabStop

Gets or sets the default tab spacing.

Selection

Gets the active text selection.

UndoLimit

Gets or sets the maximum number of actions that can be stored in the undo queue.

Methods

ApplyDisplayUpdates()

Decrements an internal counter that controls whether text updates are displayed immediately or batched.

BatchDisplayUpdates()

Increments an internal counter that controls whether text updates are displayed immediately or batched.

BeginUndoGroup()

Turns on undo grouping.

CanCopy()

Determines whether document content can be copied to the Clipboard.

CanPaste()

Determines whether the Clipboard has content that can be pasted into the document.

CanRedo()

Determines whether one or more redo operations exist.

CanUndo()

Determines whether one or more undo operations exist.

EndUndoGroup()

Turns off undo grouping.

GetDefaultCharacterFormat()

Retrieves the default character formatting attributes of the document.

GetDefaultParagraphFormat()

Retrieves the default paragraph formatting attributes of the document.

GetRange(Int32, Int32)

Retrieves a new text range for the active story of the document.

GetRangeFromPoint(Point, PointOptions)

Retrieves the degenerate (empty) text range at, or nearest to, a particular point on the screen.

GetText(TextGetOptions, String)

Gets the text in the active story (document).

LoadFromStream(TextSetOptions, IRandomAccessStream)

Loads a document from a stream.

Redo()

Reverses the most recent undo operation.

SaveToStream(TextGetOptions, IRandomAccessStream)

Saves the document to a stream.

SetDefaultCharacterFormat(ITextCharacterFormat)

Sets the default character formatting attributes of the document.

SetDefaultParagraphFormat(ITextParagraphFormat)

Sets the default paragraph formatting attributes of the document.

SetText(TextSetOptions, String)

Sets the text of the document.

Undo()

Undoes the most recent undo group.

Applies to