ParagraphLayoutBox
Measures and arranges a paragraph's inline layout boxes into lines and fragments. Line breaking accounts for paragraph formatting, available width, and floating blocks.
Definition
Namespace:Telerik.WinForms.Documents.Layout
Assembly:Telerik.WinControls.RichTextEditor.dll
Syntax:
public class ParagraphLayoutBox : LayoutBox, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor
Inheritance: objectDisposableObjectRadObjectLayoutElementLayoutBoxParagraphLayoutBox...
Implements:
Inherited Members
Constructors
Creates a layout box for a paragraph or one of its fragments.
public ParagraphLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection, bool isFragment)
The paragraph represented by the box.
collectionDocumentStructureCollectionThe document structure collection that owns the box.
isFragmentbooltrue when the box represents a continuation created by splitting the paragraph.
Creates the original, non-fragment layout box for a paragraph.
public ParagraphLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection)
The paragraph represented by the box.
collectionDocumentStructureCollectionThe document structure collection that owns the box.
Properties
Gets the paragraph model represented by this layout box.
public Paragraph AssociatedParagraph { get; }
Gets whether inline layout boxes can be created from the paragraph's content.
protected override bool CanCreateLayoutBoxesFromContent { get; }
Overrides:
Gets whether the paragraph background has a visible alpha value. Text itself is represented by the paragraph's child inline boxes.
public override bool HasVisualRepresentation { get; }
Overrides:
Methods
Arranges the measured lines and segments according to paragraph flow direction and alignment, positioning inline boxes against their line baselines.
Creates inline layout boxes from the paragraph's spans and adds the paragraph-ending formatting symbol.
protected void CreateLayoutBoxesFromContent()
Creates an empty continuation box for the same paragraph and document structure collection.
public override LayoutElement CreateLayoutElement()
A fragment ParagraphLayoutBox.
Overrides:
Creates a continuation fragment at a line boundary unless the containing block container has suspended fragmentation.
Creates a paragraph-specific position handler for navigating this layout box.
public override PositionHandler GetPositionHandler()
A handler that maps positions within the paragraph to layout coordinates.
Overrides:
Marks long-word fragmentation as stale so the next measurement can merge and re-fragment words for its width.
public void InvalidateLongWordsFragmentation()
Measures inline boxes into lines and horizontal segments, applying paragraph spacing, line breaks, available width, and floating-block constraints.
Invalidates the cached child-box lookups after the base layout measurement is invalidated.
protected override void OnInvalidateMeasure()
Overrides: