ClassRadFlowDocument
Root container for flow document content, managing sections, styles, lists, comments, resources, and document-wide settings for word processing documents.
Definition
Namespace:Telerik.Windows.Documents.Flow.Model
Assembly:Telerik.Windows.Documents.Flow.dll
Syntax:
public sealed class RadFlowDocument : DocumentElementBase, IElementWithProperties
Inheritance: objectDocumentElementBaseRadFlowDocument
Implements:
Inherited Members
Constructors
RadFlowDocument()
Initializes a new instance of the RadFlowDocument class.
Declaration
public RadFlowDocument()
Fields
DefaultTabStopWidthPropertyDefinition
Defines the default spacing between automatic tab stops when no custom tab stops are defined, measured in device-independent pixels.
Declaration
public static readonly StylePropertyDefinition<double?> DefaultTabStopWidthPropertyDefinition
Field Value
HasDifferentEvenOddPageHeadersFootersPropertyDefinition
Defines whether documents use separate headers and footers for even and odd pages in facing-page layouts.
Declaration
public static readonly StylePropertyDefinition<bool?> HasDifferentEvenOddPageHeadersFootersPropertyDefinition
Field Value
ViewTypePropertyDefinition
Defines the preferred view mode for displaying documents (e.g., print layout, web layout, outline).
Declaration
public static readonly StylePropertyDefinition<DocumentViewType?> ViewTypePropertyDefinition
Field Value
Properties
Comments
Gets the collection of comments (annotations with author and date) attached to document content ranges.
Declaration
public CommentCollection Comments { get; }
Property Value
The comments.
DefaultStyle
Gets the document-wide default character and paragraph formatting applied as the baseline for all content.
Declaration
public DocumentDefaultStyle DefaultStyle { get; }
Property Value
The default style.
DefaultTabStopWidth
Gets or sets the default spacing between automatic tab stops when no custom tab stops are defined, measured in device-independent pixels.
Declaration
public double DefaultTabStopWidth { get; set; }
Property Value
The default width of the tab stop.
Document
Gets the root document for this element, which returns itself since this is the document root.
Declaration
public override RadFlowDocument Document { get; }
Property Value
The document.
Overrides
DocumentInfo
Gets or sets the document metadata including title, author, subject, keywords, and other file properties.
Declaration
public DocumentInfo DocumentInfo { get; set; }
Property Value
The metadata.
DocumentVariables
Gets the collection of document variables that store custom name-value pairs for field references and document-specific data.
Declaration
public DocumentVariableCollection DocumentVariables { get; }
Property Value
The document variables.
HasDifferentEvenOddPageHeadersFooters
Gets or sets whether the document uses separate headers and footers for even and odd pages to support facing-page layouts.
Declaration
public bool HasDifferentEvenOddPageHeadersFooters { get; set; }
Property Value
true if pages in this document will have different headers and footers for even and odd pages; otherwise, false.
Lists
Gets the collection of list definitions that provide numbering and bullet formatting for list items.
Declaration
public ListCollection Lists { get; }
Property Value
The lists.
Properties
Gets the document-level properties container providing access to view settings, tab stops, and header/footer configuration.
Declaration
public DocumentProperties Properties { get; }
Property Value
The properties.
ProtectionSettings
Gets the document protection configuration that controls editing restrictions and password-based security.
Declaration
public ProtectionSettings ProtectionSettings { get; }
Property Value
The protection settings.
Sections
Gets the collection of sections that define page layout settings and contain the document's block-level content.
Declaration
public SectionCollection Sections { get; }
Property Value
The sections.
StyleRepository
Gets the central registry of paragraph, character, table, and numbering styles available in the document.
Declaration
public StyleRepository StyleRepository { get; }
Property Value
The style repository.
Theme
Gets or sets the document theme that defines color schemes, font schemes, and formatting effects for theme-aware styling.
Declaration
public DocumentTheme Theme { get; set; }
Property Value
The theme.
ViewType
Gets or sets the preferred view mode for displaying the document (e.g., print layout, web layout, outline).
Declaration
public DocumentViewType ViewType { get; set; }
Property Value
The type of the view.
Methods
Clone()
Creates a deep copy of the entire document including all sections, styles, lists, and content with independent instances of all elements.
Declaration
public RadFlowDocument Clone()
Returns
The cloned document.
MailMerge(IEnumerable)
Executes mail merge using the specified collection of data records and returns a new document with MERGEFIELD fields replaced by actual values.
Declaration
public RadFlowDocument MailMerge(IEnumerable collection)
Parameters
collection
The collection of records.
Returns
The merged document.
Merge(RadFlowDocument)
Appends all sections, styles, lists, and content from the source document into this document using default merge options.
Declaration
public void Merge(RadFlowDocument sourceDocument)
Parameters
sourceDocument
The source document.
Merge(RadFlowDocument, MergeOptions)
Appends all sections, styles, lists, and content from the source document into this document with specified conflict resolution options.
Declaration
public void Merge(RadFlowDocument sourceDocument, MergeOptions mergeOptions)
Parameters
sourceDocument
The source document.
mergeOptions
The merge options.
ToSimpleTextDocument(TimeSpan?)
Converts the document to plain text format and returns a simple text representation with optional timeout constraint.
Declaration
public SimpleTextDocument ToSimpleTextDocument(TimeSpan? timeout)
Parameters
timeout
The maximum time allowed for the export operation. If null, the operation will not be time-limited.
Returns
An instance of SimpleTextDocument representing the plain text version of the document.
UpdateFields()
Recalculates and updates the result text for all fields in the document, including page numbers, dates, references, and conditional fields.
Declaration
public void UpdateFields()