ITextDocument ITextDocument ITextDocument 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 ITextDocument
struct winrt::Windows::UI::Text::ITextDocument
public interface ITextDocument
Public Interface ITextDocument
Attributes
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)

Properties

CaretType CaretType CaretType CaretType

Gets or sets the caret type.

DefaultTabStop DefaultTabStop DefaultTabStop DefaultTabStop

Gets or sets the default tab spacing.

Selection Selection Selection Selection

Gets the active text selection.

UndoLimit UndoLimit UndoLimit UndoLimit

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

Methods

ApplyDisplayUpdates() ApplyDisplayUpdates() ApplyDisplayUpdates() ApplyDisplayUpdates()

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

BatchDisplayUpdates() BatchDisplayUpdates() BatchDisplayUpdates() BatchDisplayUpdates()

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

BeginUndoGroup() BeginUndoGroup() BeginUndoGroup() BeginUndoGroup()

Turns on undo grouping.

CanCopy() CanCopy() CanCopy() CanCopy()

Determines whether document content can be copied to the Clipboard.

CanPaste() CanPaste() CanPaste() CanPaste()

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

CanRedo() CanRedo() CanRedo() CanRedo()

Determines whether one or more redo operations exist.

CanUndo() CanUndo() CanUndo() CanUndo()

Determines whether one or more undo operations exist.

EndUndoGroup() EndUndoGroup() EndUndoGroup() EndUndoGroup()

Turns off undo grouping.

GetDefaultCharacterFormat() GetDefaultCharacterFormat() GetDefaultCharacterFormat() GetDefaultCharacterFormat()

Retrieves the default character formatting attributes of the document.

GetDefaultParagraphFormat() GetDefaultParagraphFormat() GetDefaultParagraphFormat() GetDefaultParagraphFormat()

Retrieves the default paragraph formatting attributes of the document.

GetRange(Int32, Int32) GetRange(Int32, Int32) GetRange(Int32, Int32) GetRange(Int32, Int32)

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

GetRangeFromPoint(Point, PointOptions) GetRangeFromPoint(Point, PointOptions) GetRangeFromPoint(Point, PointOptions) GetRangeFromPoint(Point, PointOptions)

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

GetText(TextGetOptions, String) GetText(TextGetOptions, String) GetText(TextGetOptions, String) GetText(TextGetOptions, String)

Gets the text in the active story (document).

LoadFromStream(TextSetOptions, IRandomAccessStream) LoadFromStream(TextSetOptions, IRandomAccessStream) LoadFromStream(TextSetOptions, IRandomAccessStream) LoadFromStream(TextSetOptions, IRandomAccessStream)

Loads a document from a stream.

Redo() Redo() Redo() Redo()

Reverses the most recent undo operation.

SaveToStream(TextGetOptions, IRandomAccessStream) SaveToStream(TextGetOptions, IRandomAccessStream) SaveToStream(TextGetOptions, IRandomAccessStream) SaveToStream(TextGetOptions, IRandomAccessStream)

Saves the document to a stream.

SetDefaultCharacterFormat(ITextCharacterFormat) SetDefaultCharacterFormat(ITextCharacterFormat) SetDefaultCharacterFormat(ITextCharacterFormat) SetDefaultCharacterFormat(ITextCharacterFormat)

Sets the default character formatting attributes of the document.

SetDefaultParagraphFormat(ITextParagraphFormat) SetDefaultParagraphFormat(ITextParagraphFormat) SetDefaultParagraphFormat(ITextParagraphFormat) SetDefaultParagraphFormat(ITextParagraphFormat)

Sets the default paragraph formatting attributes of the document.

SetText(TextSetOptions, String) SetText(TextSetOptions, String) SetText(TextSetOptions, String) SetText(TextSetOptions, String)

Sets the text of the document.

Undo() Undo() Undo() Undo()

Undoes the most recent undo group.