New to Telerik Document ProcessingStart a free 30-day trial

RadFlowDocument

Updated on Jun 16, 2026

RadFlowDocument hosts flow document content and is the root element in the document elements tree. It holds a collection of Section elements.

Inserting and Modifying a RadFlowDocument

The code from Example 1 shows how you can create a new RadFlowDocument.

Example 1: Create RadFlowDocument

C#
RadFlowDocument document = new RadFlowDocument();

RadFlowDocument exposes the following properties to customize the way content is presented:

PropertyDescription
DocumentInfoEnables you to set and obtain metadata for the document file. Of type DocumentInfo, it allows you to get and set Author, Title, Subject, Keywords, and Description.
ViewTypeAn enumeration that specifies how the document should be laid out when displayed. Whether this property is respected depends on the application used to open the document.
ThemeSpecifies the theme applied to the document. The document theme enables you to specify colors, fonts, and graphic effects that affect the look of the whole document. More information is available in the Document Themes article.
StyleRepositoryRepresents the document's StyleRepository. The repository allows you to add, remove, or enumerate the styles of the document.
DefaultStyleThe default styles used for Paragraph and Run elements. More information on default styles is available in the Styles article.
HasDifferentEvenOddPageHeadersFootersGets or sets whether pages in this document have different headers and footers for even and odd pages.
ListCollectionRepresents the collection of Lists in the document.
CommentCollectionRepresents the collection of Comments in the document.
ProtectionSettingsCorresponds to the settings used when the document is protected. More information is available in the PermissionRange article.
DefaultTabStopWidthThe distance between automatic TabStops.

Operating with a RadFlowDocument

You can execute different actions with the help of the RadFlowDocument element.

Adding Sections

You can create a RadFlowDocument from scratch and add Sections to it as follows:

Example 2: Add a Section to a RadFlowDocument

C#
RadFlowDocument document = new RadFlowDocument();
document.Sections.AddSection();

The Sections property of the document is of type SectionCollection and allows you to add sections to the document.

Alternatively, you can create a section by passing to its constructor the document it is associated with.

Example 3: Create a section

C#
Section section = new Section(document);

Merge with Another Document

You can merge a RadFlowDocument within another document by using the Merge() method and passing the source document as a parameter:

Example 4: Merge documents

C#
document.Merge(sourceDocument);

You can also specify the MergeOptions that control the merge operation:

  • ConflictingStylesResolutionMode: An enumeration specifying the mode used for resolving conflicts between styles with the same IDs. The possible values for ConflictingStylesResolutionMode are:

    • UseTargetStyle: If a conflict between styles with the same IDs appears, the style of the target document is used.
    • RenameSourceStyle: If a conflict between styles with the same IDs appears, the style of the source document is renamed and used.

Example 5: Merge documents using MergeOptions

C#
MergeOptions mergeOptions = new MergeOptions();
mergeOptions.ConflictingStylesResolutionMode = ConflictingStylesResolutionMode.RenameSourceStyle;

document.Merge(sourceDocument, mergeOptions);

Update Fields

RadFlowDocument exposes an UpdateFields() method that allows you to update all fields in the document. More information about fields is available in the Fields article.

The snippet from Example 6 shows how to update all fields in a document simultaneously.

Example 6: Update all fields in a document

C#
document.UpdateFields();

See Also