Skip to main content
A newer version of this page is available. .

CalculateDocumentVariableEventArgs.KeepLastParagraph Property

Gets or sets whether the last paragraph of the inserted document is kept in the resulting document.

Namespace: DevExpress.XtraRichEdit

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

Declaration

public bool KeepLastParagraph { get; set; }

Property Value

Type Description
Boolean

true to retain the last paragraph of the inserted document; otherwise, false.

Remarks

The Document.CalculateDocumentVariable event allows you to insert a document in place of the DOCVARIABLE field. To accomplish this, you can pass a RichEditDocumentServer instance containing the document as the event argument’s CalculateDocumentVariableEventArgs.Value parameter. Note that this is not the only way to insert a document. You can also pass a Document object or a DocumentRange.

In both cases you can specify the KeepLastParagraph option so that the last paragraph of the inserted document is retained in the resulting document. If set to true, this option preserves the formatting of the last inserted paragraph and adds an extra paragraph in the resulting document.

See Also