New to Telerik UI for WinForms? Start a free 30-day trial

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:

C#
public class SectionLayoutBox : LayoutBox, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor

Inheritance: objectDisposableObjectRadObjectLayoutElementLayoutBoxSectionLayoutBox...

Implements: ICustomTypeDescriptorIDisposableINotifyPropertyChanged

Inherited Members LayoutBox.currentYLayoutBox.AssociatedLayoutBoxPropertyLayoutBox.NodeLayoutBox.GetAssociatedLayoutBox(UIElement)LayoutBox.SetAssociatedLayoutBox(UIElement, LayoutBox)LayoutBox.OnElementStructureChanging()LayoutBox.OnElementStructureChanged()LayoutBox.OnAssociateDocumentElementChanged()LayoutBox.CreateChildrenCollection(DocumentStructureCollection)LayoutBox.ToString()LayoutBox.InvalidateMeasureUpToTheRoot()LayoutBox.InvalidateMeasureUpToTheRootStable()LayoutBox.InvalidateArrangeUpToTheRoot()LayoutBox.InvalidateLayoutAfterEdit()LayoutBox.ValidateChild(LayoutBox)LayoutBox.GetRootDocument()LayoutBox.CanGrowVertically(float)LayoutBox.GetBoxDesiredGrow()LayoutBox.CreateNewFragment(LayoutBox)LayoutBox.MergeWithNext(LayoutBox)LayoutBox.GetPositionHandler()LayoutBox.InvalidateMeasure()LayoutBox.IsRemovedLayoutBox.IsFragmentLayoutBox.AssociatedDocumentElementLayoutBox.ChildLayoutBoxesLayoutBox.IsFormattingSymbolLayoutBox.BoundsChildBoxesLayoutBox.IsFirstBoxLayoutBox.IsLastBoxLayoutBox.IsFirstChildLayoutBox.IsLastChildLayoutBox.IsValidPositionLayoutBox.ParentLayoutBox.ChildIndexLayoutBox.BoundingRectangleLayoutBox.IsContainerBoxLayoutBox.ElementStructureChangingLayoutBox.ElementStructureChangedLayoutElement.EnsureChildrenCreated()LayoutElement.CreateChildren()LayoutElement.OnBitStateChanged(DocumentElementStates, bool, bool)LayoutElement.SetBitState(DocumentElementStates, bool)LayoutElement.ValidateParent(LayoutElement)LayoutElement.SetParent(LayoutElement, LayoutElement)LayoutElement.SetParentCore(LayoutElement)LayoutElement.IsInValidState(bool)LayoutElement.OnInvalidateMeasure()LayoutElement.InvalidateMeasure(bool)LayoutElement.InvalidateArrange()LayoutElement.OnInvalidateArrange()LayoutElement.InvalidateArrange(bool)LayoutElement.Arrange(RectangleF)LayoutElement.ArrangeCore(RectangleF)LayoutElement.Measure(SizeF)LayoutElement.MeasureCore(SizeF)LayoutElement.OnChildDesiredSizeChanged(LayoutElement)LayoutElement.OnParentChanging()LayoutElement.OnParentChanged()LayoutElement.LayoutOffsetLayoutElement.LocalBoundingRectangleLayoutElement.ControlBoundingRectangleLayoutElement.ClippedControlBoundingRectangleLayoutElement.TotalTransformLayoutElement.ChildrenLayoutElement.BitStateLayoutElement.DesiredSizeLayoutElement.IsMeasureInProgressLayoutElement.BypassLayoutPoliciesLayoutElement.MeasureWithoutParentNotificationLayoutElement.SizeLayoutElement.IsArrangeValidLayoutElement.IsMeasureValidLayoutElement.TreeLevelLayoutElement.PreviousArrangeRectLayoutElement.AlignmentLayoutElement.AutoSizeLayoutElement.TransformLayoutElement.ParentChangingLayoutElement.ParentChangedRadObject.BindingContextPropertyRadObject.RadTypeRadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadObject.DisposeManagedResources()RadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.GetValue(RadProperty)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.SetValueCore(RadPropertyValue, object, object, ValueSource)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.AddStylePropertySetting(IPropertySetting)RadObject.GetInheritedValue(RadProperty)RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.IsPropertyCancelable(RadPropertyMetadata)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.PerformDispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing...

Constructors

Creates a layout box for a section or a fragment produced when the section is split.

C#
public SectionLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection, bool shouldFragmentize)
Parameters:associatedDocumentElementDocumentElement

The section represented by the box.

collectionDocumentStructureCollection

The document structure collection that owns the box.

shouldFragmentizebool

true when this box is a continuation created by splitting the section.

Creates the original, non-fragment layout box for a section.

C#
public SectionLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection)
Parameters:associatedDocumentElementDocumentElement

The section represented by the box.

collectionDocumentStructureCollection

The document structure collection that owns the box.

Properties

Gets the section model represented by this layout box.

C#
public Section AssociatedSection { get; }

Gets whether paragraph layout boxes can be created from the section's block collection.

C#
protected override bool CanCreateLayoutBoxesFromContent { get; }

Overrides: LayoutBox.CanCreateLayoutBoxesFromContent

Gets whether rendering layers include this box when producing document visuals.

C#
public override bool HasVisualRepresentation { get; }

Overrides: LayoutBox.HasVisualRepresentation

Gets whether this section provides the vertical-growth policy for its contained blocks.

C#
public override bool IsTopContainer { get; }

Overrides: LayoutElement.IsTopContainer

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.

C#
public int PageNumber { get; }

Methods

Arranges the section's blocks within its margins and columns, assigning each block its column index when applicable.

C#
protected override SizeF ArrangeOverride(SizeF finalSize)
Parameters:finalSizeSizeF

The size assigned to the section fragment.

Returns:

SizeF

The final section size after arranging its blocks.

Overrides: LayoutElement.ArrangeOverride(SizeF)

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.

C#
protected override bool? CanGrowVerticallyOverride(float desiredHeight)
Parameters:desiredHeightfloat

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: LayoutBox.CanGrowVerticallyOverride(float)

Creates a paragraph layout box for each paragraph in the section's block collection.

C#
protected void CreateLayoutBoxesFromContent(LayoutElementCollection fragmentList)
Parameters:fragmentListLayoutElementCollection

The collection that receives the paragraph boxes.

Creates a continuation box for the same section and document structure collection.

C#
public override LayoutElement CreateLayoutElement()
Returns:

LayoutElement

A fragment SectionLayoutBox.

Overrides: LayoutBox.CreateLayoutElement()

Gets the footer selected for this page, following linked-footer settings from preceding sections.

C#
public Footer GetFooter()
Returns:

Footer

The footer assigned to this page's footer type.

Gets the margin of the footer inside the bottom page margin.

C#
public Padding GetFooterContentMargins()
Returns:

Padding

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.

C#
public float GetFooterHeight()
Returns:

float

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.

C#
public Header GetHeader()
Returns:

Header

The header assigned to this page's header type.

Gets the margin of the header content inside the top page margin.

C#
public Padding GetHeaderContentMargins()
Returns:

Padding

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.

C#
public HeaderFooterType GetHeaderFooterType()
Returns:

HeaderFooterType

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.

C#
public float GetHeaderHeight()
Returns:

float

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.

C#
protected override SizeF MeasureOverride(SizeF availableSize)
Parameters:availableSizeSizeF

The size available to the section layout.

Returns:

SizeF

The measured size of the section fragment.

Overrides: LayoutElement.MeasureOverride(SizeF)

Sets the footer for this page's footer type.

C#
public void SetFooter(Footer footer)
Parameters:footerFooter

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.

C#
public void SetHeader(Header header)
Parameters:headerHeader

The header to assign; if this type is linked to the previous section, that section's header is updated.