How to: Mark Text as Hidden

The following example describes how to mark text as hidden in the RichEditDocumentServer.

The code sample below hides the third document paragraph using the API from the table.

Member Description
SubDocument.BeginUpdateCharacters Starts the characters update for the given DocumentRange object.
CharacterPropertiesBase.Hidden Gets or sets whether to mark the given text as hidden.
SubDocument.EndUpdateCharacters Finalizes the characters update.
DocumentRange hiddenRange = richEditDocumentServer1.Document.Paragraphs[2].Range;
CharacterProperties hiddenTextProperties = richEditControl1.Document.BeginUpdateCharacters(hiddenRange);
hiddenTextProperties.Hidden = true;
richEditDocumentServer1.Document.EndUpdateCharacters(hiddenTextProperties);