RichEditTextDocument Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a rich text document that can be loaded, saved, and edited.
public ref class RichEditTextDocument sealed
public ref class RichEditTextDocument sealed : ITextDocument
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RichEditTextDocument final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 262144)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class RichEditTextDocument final : ITextDocument
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RichEditTextDocument
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 262144)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class RichEditTextDocument : ITextDocument
Public NotInheritable Class RichEditTextDocument
Public NotInheritable Class RichEditTextDocument
Implements ITextDocument
- Inheritance
- Attributes
- Implements
Windows requirements
Device family |
Windows 10 Creators Update (introduced in 10.0.15063.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v4.0)
|
Remarks
Version history
Windows version | SDK version | Value added |
---|---|---|
1809 | 17763 | ClearUndoRedoHistory |
2004 | 19041 | GetMath |
2004 | 19041 | SetMath |
2004 | 19041 | SetMathMode |
Properties
AlignmentIncludesTrailingWhitespace |
Gets or sets a value that indicates whether trailing white space is taken into account when text is aligned. |
CaretType |
Gets or sets the caret type. |
DefaultTabStop |
Gets or sets the default tab spacing. |
IgnoreTrailingCharacterSpacing |
Gets or sets a value that indicates whether character spacing is applied to the last character in a line. |
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. |
ClearUndoRedoHistory() |
Empties the undo and redo buffers. |
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. |
GetMath(String) |
Retrieves the RichEditBox content as MathML. Important The RichEditTextDocument.GetMath API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, contact Microsoft Support. |
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. |
SetMath(String) |
Sets the RichEditBox content to the specified MathML. Important The RichEditTextDocument.SetMath API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, contact Microsoft Support. |
SetMathMode(RichEditMathMode) |
Configures a RichEditBox to interpret input based on the specified math mode. Important The RichEditTextDocument.SetMathMode API is part of a Limited Access Feature (see LimitedAccessFeatures class). For more information or to request an unlock token, contact Microsoft Support. |
SetText(TextSetOptions, String) |
Sets the text of the document. |
Undo() |
Undoes the most recent undo group. |
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for