Skip to main content
A newer version of this page is available. .
.NET Framework 4.5.2+

CopyPasteOptions.MaintainDocumentSectionSettings Property

Gets or sets whether to retain section settings of a blank document after appending RTF content.

Namespace: DevExpress.XtraRichEdit

Assembly: DevExpress.RichEdit.v19.1.Core.dll

Declaration

[DefaultValue(false)]
public bool MaintainDocumentSectionSettings { get; set; }

Property Value

Type Default Description
Boolean **false**

true, to keep section settings of a target blank document; otherwise, false.

Property Paths

You can access this nested property as listed below:

Library Object Type Path to MaintainDocumentSectionSettings
WinForms Controls SnapControlOptions
.CopyPaste.MaintainDocumentSectionSettings
RichEditControlOptions
.CopyPaste.MaintainDocumentSectionSettings
WPF Controls RichEditControlOptions
.CopyPaste.MaintainDocumentSectionSettings
Office File API RichEditControlOptionsBase
.CopyPaste.MaintainDocumentSectionSettings

Remarks

The MaintainDocumentSectionSettings option is helpful in following situations.

First, create an empty document as described below. You can either:

  • Create a blank document with specific section settings by loading a document from a template.
  • Create a new document programmatically (using the CreateNewDocument method) and specify section settings.
  • Delete document content in code or by using UI commands.

Next, append the content of another document to the blank document. To accomplish this, you can copy and paste the entire document (CTRL-A - CTRL-C - CTRL-V) or use the SubDocument.AppendDocumentContent or SubDocument.AppendRtfText methods.

By default, when you copy document content to an empty document, the settings of the empty document are ignored. To prevent this, set the MaintainDocumentSectionSettings to true. Then, the copied content takes the settings of the empty document to which it is copied.

See Also