SectionLayoutBox
Measures and arranges a section's block content, including page slices, columns, margins, and notes.
Definition
Namespace:Telerik.WinForms.Documents.Layout
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class SectionLayoutBox : LayoutBox, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Inheritance: objectDisposableObjectRadObjectLayoutElementLayoutBoxSectionLayoutBox...
Implements:
Inherited Members
Constructors
Creates a layout box for a section or a fragment produced when the section is split.
public SectionLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection, bool shouldFragmentize)
The section represented by the box.
collectionDocumentStructureCollectionThe document structure collection that owns the box.
shouldFragmentizebooltrue when this box is a continuation created by splitting the section.
Creates the original, non-fragment layout box for a section.
public SectionLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection)
The section represented by the box.
collectionDocumentStructureCollectionThe document structure collection that owns the box.
Properties
Gets the section model represented by this layout box.
public Section AssociatedSection { get; }
Gets whether paragraph layout boxes can be created from the section's block collection.
protected override bool CanCreateLayoutBoxesFromContent { get; }
Overrides:
Gets whether rendering layers include this box when producing document visuals.
public override bool HasVisualRepresentation { get; }
Overrides:
Gets whether this section provides the vertical-growth policy for its contained blocks.
public override bool IsTopContainer { get; }
Overrides:
Gets the page number represented by this box. Continuation slices share their head slice's page number; section start-page and odd/even break settings affect numbering.
public int PageNumber { get; }
Methods
Arranges the section's blocks within its margins and columns, assigning each block its column index when applicable.
Determines whether the current page or section slice can accommodate additional content height. Flow layout and suspended pagination allow growth; paged layout accounts for page limits, margins, and notes.
protected override bool? CanGrowVerticallyOverride(float desiredHeight)
The vertical extent requested by the current content and its containing layout boxes.
Returns:bool?
true when the content fits or growth is unrestricted; false when it exceeds the page or slice; null when the first child alone exceeds the page height and the caller must handle that case.
Overrides:
Creates a paragraph layout box for each paragraph in the section's block collection.
protected void CreateLayoutBoxesFromContent(LayoutElementCollection fragmentList)
The collection that receives the paragraph boxes.
Creates a continuation box for the same section and document structure collection.
public override LayoutElement CreateLayoutElement()
A fragment SectionLayoutBox.
Overrides:
Gets the footer selected for this page, following linked-footer settings from preceding sections.
Gets the margin of the footer inside the bottom page margin.
public Padding GetFooterContentMargins()
A padding whose horizontal values match the page margins and whose vertical values account for the footer position and height.
Gets the height consumed by the footer selected for this page, including its bottom margin.
public float GetFooterHeight()
The footer content height plus its bottom margin, or 0 when layout is not paged or no footer is selected.
Gets the header selected for this page, following linked-header settings from preceding sections.
Gets the margin of the header content inside the top page margin.
public Padding GetHeaderContentMargins()
A padding whose horizontal values match the page margins and whose vertical values account for the header position and height.
Gets the type of the header and footer for this page.
public HeaderFooterType GetHeaderFooterType()
The first, even, or default type selected for this page by the section's page-number settings.
Gets the height consumed by the header selected for this page, including its top margin.
public float GetHeaderHeight()
The header content height plus its top margin, or 0 when layout is not paged or no header is selected.
Measures the section's blocks within its page, column, margin, and note constraints. Internal measure passes repeat until complete; the last section fragment may split to make room for endnotes.
Sets the footer for this page's footer type.
public void SetFooter(Footer footer)
The footer to assign; if this type is linked to the previous section, that section's footer is updated.
Sets the header for this page's header type.
public void SetHeader(Header header)
The header to assign; if this type is linked to the previous section, that section's header is updated.