Model
RadFlowDocument describes flow document (document designed to dynamically adjust its layout according to the available size). This article explains in details the structure of RadFlowDocument's document model.
Document Elements
RadFlowDocument can contain various types of document elements, all of them inheriting the DocumentElementBase abstract class. The hierarchy is presented in the following diagram, where abstract classes are denoted in blue:
Every document element is associated with an instance of RadFlowDocument since its creation. This link is permanent and attempts to move document elements from one document to another result in exception; cloning can be used instead to create deep copy of an element associated to another instance of RadFlowDocument. Current associated document is stored in the Document property.
Composition of Document Elements
RadFlowDocument represents a tree of document elements containing each other through a set of properties and collections. Possible containments are described in the following diagram, where document elements are denoted in black, collections in orange, and properties in green:
RadFlowDocument contains collection of Sections.
Section contains collection of Blocks (Paragraphs and Tables), as well as three Headers and three Footers – one default, one for even pages and one for first section page.
Paragraph contains collection of Inlines – Runs, ImageInlines, FloatingImages and FieldCharacters.
Table contains collection of TableRows.
TableRow contains collection of TableCells.
TableCell contains collection of Blocks.
Headers and Footers contain collection of Blocks.
Common ways for traversing the links between document elements
Relationships between document elements can be additionally traversed using:
Parent property. This property contains reference to document's parent and is automatically set when element is added/removed as a child of another element.
EnumerateChildrenOfType
method. This method can be used to recursively traverse document tree and return all children of given type T.