ITextDocument interface

Applies to Windows and Windows Phone

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.

Syntax


public interface ITextDocument

Attributes

[Version(0x06020000)]
[WebHostHidden()]

Members

The ITextDocument interface has these types of members:

Methods

The ITextDocument interface has these methods. It also inherits methods from the Object class.

MethodDescription
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 Retrieves a new text range for the active story of the document.
GetRangeFromPoint Retrieves the degenerate (empty) text range at, or nearest to, a particular point on the screen.
GetText Gets the text in the active story (document).
LoadFromStream Loads a document from a stream.
Redo Reverses the most recent undo operation.
SaveToStream Saves the document to a stream.
SetDefaultCharacterFormat Sets the default character formatting attributes of the document.
SetDefaultParagraphFormat Sets the default paragraph formatting attributes of the document.
SetText Sets the text of the document.
Undo Undoes the most recent undo group.

 

Properties

The ITextDocument interface has these properties.

PropertyAccess typeDescription

CaretType

Read/writeGets or sets the caret type.

DefaultTabStop

Read/writeGets or sets the default tab spacing.

Selection

Read-onlyGets the active text selection.

UndoLimit

Read/writeGets or sets the maximum number of actions that can be stored in the undo queue.

 

Requirements

Minimum supported client

Windows 8

Minimum supported server

Windows Server 2012

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Text
Windows::UI::Text [C++]

Metadata

Windows.winmd

 

 

Show:
© 2014 Microsoft