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

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:

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

Inheritance: objectDisposableObjectRadObjectLayoutElementLayoutBoxParagraphLayoutBox...

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.CanGrowVerticallyOverride(float)LayoutBox.CanGrowVertically(float)LayoutBox.GetBoxDesiredGrow()LayoutBox.MergeWithNext(LayoutBox)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.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.IsTopContainerLayoutElement.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 paragraph or one of its fragments.

C#
public ParagraphLayoutBox(DocumentElement associatedDocumentElement, DocumentStructureCollection collection, bool isFragment)
Parameters:associatedDocumentElementDocumentElement

The paragraph represented by the box.

collectionDocumentStructureCollection

The document structure collection that owns the box.

isFragmentbool

true when the box represents a continuation created by splitting the paragraph.

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

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

The paragraph represented by the box.

collectionDocumentStructureCollection

The document structure collection that owns the box.

Properties

Gets the paragraph model represented by this layout box.

C#
public Paragraph AssociatedParagraph { get; }

Gets whether inline layout boxes can be created from the paragraph's content.

C#
protected override bool CanCreateLayoutBoxesFromContent { get; }

Overrides: LayoutBox.CanCreateLayoutBoxesFromContent

Gets whether the paragraph background has a visible alpha value. Text itself is represented by the paragraph's child inline boxes.

C#
public override bool HasVisualRepresentation { get; }

Overrides: LayoutBox.HasVisualRepresentation

Gets the number of lines counted during the most recent measurement.

C#
public int LineCount { get; }

Methods

Arranges the measured lines and segments according to paragraph flow direction and alignment, positioning inline boxes against their line baselines.

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

The size assigned to this paragraph fragment.

Returns:

SizeF

The size occupied after arranging the paragraph.

Overrides: LayoutElement.ArrangeOverride(SizeF)

Creates inline layout boxes from the paragraph's spans and adds the paragraph-ending formatting symbol.

C#
protected void CreateLayoutBoxesFromContent()

Creates an empty continuation box for the same paragraph and document structure collection.

C#
public override LayoutElement CreateLayoutElement()
Returns:

LayoutElement

A fragment ParagraphLayoutBox.

Overrides: LayoutBox.CreateLayoutElement()

Creates a continuation fragment at a line boundary unless the containing block container has suspended fragmentation.

C#
public override void CreateNewFragment(LayoutBox currentLineStartNode)
Parameters:currentLineStartNodeLayoutBox

The first box to place in the new fragment, or null to split at the container boundary.

Overrides: LayoutBox.CreateNewFragment(LayoutBox)

Creates a paragraph-specific position handler for navigating this layout box.

C#
public override PositionHandler GetPositionHandler()
Returns:

PositionHandler

A handler that maps positions within the paragraph to layout coordinates.

Overrides: LayoutBox.GetPositionHandler()

Marks long-word fragmentation as stale so the next measurement can merge and re-fragment words for its width.

C#
public void InvalidateLongWordsFragmentation()

Measures inline boxes into lines and horizontal segments, applying paragraph spacing, line breaks, available width, and floating-block constraints.

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

The size available for this paragraph fragment.

Returns:

SizeF

The measured size of the paragraph fragment.

Overrides: LayoutElement.MeasureOverride(SizeF)

Invalidates the cached child-box lookups after the base layout measurement is invalidated.

C#
protected override void OnInvalidateMeasure()

Overrides: LayoutElement.OnInvalidateMeasure()