Version

RichTextDocument Class Members

The following tables list the members exposed by RichTextDocument.

Public Constructors
 NameDescription
Public ConstructorRichTextDocument ConstructorInitializes a new RichTextDocument  
Public Properties
 NameDescription
Public PropertyAggregateOffsetCountGets the total length of the document, which includes all the text as well as offsets that are assigned to other content such as paragraphs, list items, images etc...  
Public PropertyAvailableStylesA collection of the styles that are available to the document.  
Public PropertyCurrentVersionGets the instance representing the current version of the document.  
Public Propertystatic (Shared in Visual Basic)DefaultAvailableStylesA static collection of styles used to pre-populate each RichTextDocument's AvailableStyles collection.  
Public PropertyIsReadOnlyReturns/sets whether or not the text in the document can be changed.  
Public PropertyRootNodeGets the document root node.  
Public PropertyUndoManagerReturns/sets the object that manages the undo/redo stacks  
Public PropertyUnsupportedContentHandlingModeGets or sets the value indicating how to handle known unsupported content when portions of it can be loaded.  
Public PropertyUnsupportedContentHighlightSettingsGets or sets the character settings to use when highlighting portions of unsupported content which could be loaded.  
Public PropertyUnsupportedContentMessageGets or sets the message to use when displaying a message in place of known unsupported content.  
Public Methods
 NameDescription
Public MethodAppendTextAppends the specified text at the end of the document.  
Public MethodApplyCharacterSettingsOverloaded. Applies any non-null settings in the specified settings object to text in the specified span.  
Public MethodApplyCharacterStyleApplies specified character style to runs in the specified span.  
Public MethodApplyParagraphListStyleApplies the specified list style to paragraphs intersecting the specified span, in effect making the paragraphs into a bulleted or numbered list according to the list style referred to by the specified listStyleId.  
Public MethodApplyParagraphSettingsApplies the non-null settings in the specified settings object to paragraphs intersecting the specified span.  
Public MethodApplyParagraphStyleApplies specified paragraph style to paragraphs intersecting the specified span.  
Public MethodClearCharacterStyleResets RunNode.StyleId to null on runs in the specified span.  
Public MethodClearParagraphListStyleMakes paragraphs intersecting the specified span non-list (not bulleted or numbered) paragraphs.  
Public MethodClearParagraphStyleResets ParagraphNode.StyleId to null on paragraphs intersecting the specified span.  
Public MethodClearUndoRedoHistoryRemoves all the Undo and Redo history that relates to this RichTextDocument.  
Public MethodDeleteOverloaded. Deletes contents in the specified document span.  
Public MethodDeleteTableRowDeletes a table row.  
Public MethodFindAllOverloaded. Finds all instances of textToFind in the specified document span. Performs case-insensitive search by default.  
Public MethodGetAvailableCharacterStylesEnumerates the available Character styles  
Public MethodGetAvailableListStylesEnumerates the available List styles  
Public MethodGetAvailableParagraphStylesEnumerates the available Paragraph styles  
Public MethodGetAvailableTableStylesEnumerates the available Table styles  
Public MethodGetCommonCharacterSettingsGets the common character settings across the runs in the specified span.  
Public MethodGetCommonParagraphListStyleGets the id of the list style used by paragraphs intersecting the specified span.  
Public MethodGetCommonParagraphSettingsGets the common paragraph settings across paragraphs that intersect the specified span.  
Public MethodGetHyperlinksGets the hyperlinks intersecting the specified document span.  
Public MethodGetLargestFontSizeGets the largest font size among runs intersecting the specified span.  
Public MethodGetNodeAtDocumentOffsetGets the node at the specified document offset. Returns null if the offset is beyond the range.  
Public MethodGetNodeSpanGets the document span of the specified node.  
Public MethodGetParagraphsGets the paragraphs intersecting the specified document span.  
Public MethodGetRunsGets the RunNodes intersecting the specified document span.  
Public MethodGetSmallestFontSizeGets the smallest font size among runs intersecting the specified span.  
Public MethodGetTableCellsGets the table cells intersecting the specified document span.  
Public MethodGetTableRowsGets the table rows intersecting the specified document span.  
Public MethodGetTextInSpanOverloaded. Gets text in the specified document span.  
Public MethodGrowFontSizeIncreases the font size of text within the specified document span.  
Public MethodIndentListIndents the RichTextList (bulleted or numbered list) associated with the paragraph at the specified documentOffset. If the paragraph at the 'documentOffset' is not part of a list then this method does nothing.  
Public MethodIndentParagraphsAdds to the existing indentation of paragraphs intersecting the specified document span by the specified amount. If paragraphs are part of a list then changes their list levels instead.  
Public MethodInsertContentInserts the specified content at the specified document offset.  
Public MethodInsertHyperlinkInserts a hyperlink to an external resource such as a website.  
Public MethodInsertParagraphInserts a new paragraph at the specified offset in the document.  
Public MethodInsertTableInserts a new table at the specified document offset.  
Public MethodInsertTableRowOverloaded. Inserts a new table row before or after existing table row at documentOffset.  
Public MethodInsertTableRowsInserts a new table row before or after existing table row at documentOffset.  
Public MethodInsertTextInserts the specified text in the document at the specified document offset. If the document offset refers to a block node, it finds an appropriate text node inside the block node to add the text to. If a text node is not found, it will add one to ensure the text gets inserted at a location that would be considered 'intended' within the block node.  
Public MethodLoadOverloaded. Loads the content from a file into the document using the specified serialization provider.  
Public MethodLoadFromPlainTextOverloaded. Loads the plain text content from a file into the document.  
Public MethodMakeHyperlinkMakes the content in the specified span a hyperlink.  
Public MethodOnEditorLostFocusIndicates that the editor hosting the RichTextDocument has lost focus.  
Public MethodOutdentListOutdents the RichTextList (bulleted or numbered list) associated with the paragraph at the specified documentOffset. If the paragraph at the 'documentOffset' is not part of a list then this method does nothing.  
Public MethodOutdentParagraphsSubstracts from the existing indentation of paragraphs intersecting the specified document span by the specified amount. If paragraphs are part of a list then changes their list levels instead.  
Public MethodRemoveHyperlinksRemoves all hyperlinks that intersect the specified span.  
Public MethodReplaceAllOverloaded. Replaces all instances of textToFind in the specified document span with the replacementText. Performs case-insensitive search by default.  
Public MethodReplaceContentsOverloaded. Replaces the contents in specified document span with the specified 'newText'.  
Public Methodstatic (Shared in Visual Basic)RetainCurrentClipboardDataIf the current data on the Clipboard was placed there by a RichTextDocument in the current AppDomain, this method will ensure the data stays on the Clipboard so it can still be pasted to external applications even if the application is closing.  
Public MethodSaveOverloaded. Saves the content from the document into a file using the specified serialization provider.  
Public MethodSaveToPlainTextOverloaded. Saves the content from the document into a file using a plain text format.  
Public MethodSetCharacterSettingsProperty<TValue>Sets character settings property or a sub-property on the text in the specified span.  
Public MethodSetParagraphSettingsProperty<TValue>Sets paragraph settings property or a sub-property on the settings of paragraphs intersecting the specified span.  
Public MethodSetTextInSpanOverloaded. Sets text in the specified document span.  
Public MethodShrinkFontSizeDecreases the font size of the text within the specified document span.  
Public MethodStartUndoLoggingStarts undo logging if not already started.  
Public MethodStopUndoLoggingStops undo logging. Note that existing undo/redo history of the document will be cleared.  
Public MethodToggleCharacterFormattingToggles specified character formatting on the text contained in the specified span.  
Public Events
 NameDescription
Public EventContentChangedOccurs when the content in the document is changed.  
Public EventPropertyChangedOcuurs after a property value has changed  
See Also