.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

SubDocument.BeginUpdateCharacters(DocumentRange) Method

Starts modifying properties of characters that fall within a specified document range.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v20.2.Core.dll

Declaration

CharacterProperties BeginUpdateCharacters(
    DocumentRange range
)

Parameters

Name Type Description
range DocumentRange

A DocumentRange object specifying the DocumentRange.Start and DocumentRange.End of the text.

Returns

Type Description
CharacterProperties

A CharacterProperties object representing the character formatting of the specified range.

Examples

Document document = server.Document;
document.BeginUpdate();
document.AppendText("Normal\nFormatted\nNormal");
document.EndUpdate();
DocumentRange range = document.Paragraphs[1].Range;
CharacterProperties cp = document.BeginUpdateCharacters(range);
cp.FontName = "Comic Sans MS";
cp.FontSize = 18;
cp.ForeColor = Color.Blue;
cp.BackColor = Color.Snow;
cp.Underline = UnderlineType.DoubleWave;
cp.UnderlineColor = Color.Red;
document.EndUpdateCharacters(cp);
See Also