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

Measures and vertically positions comment balloons alongside their comment-range markers.

Definition

Namespace:Telerik.WinForms.Documents.UI.Annotations

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class CommentsPaneLayout

Inheritance: objectCommentsPaneLayout

Constructors

C#
public CommentsPaneLayout()

Methods

Invalidates the cached layout so the next call to Measure(IEnumerable<LayoutBox>, SizeF, PointF, Padding, Thickness) recalculates balloon positions and sizes.

C#
public void InvalidateMeasure()

Measures comment balloons in marker order, avoids overlap where possible, and adjusts their positions and heights to fit the pane.

C#
public void Measure(IEnumerable<LayoutBox> layoutBoxes, SizeF availableSize, PointF sectionViewOffset, Padding sectionMargin, Thickness commentTemplateEditorMargin)
Parameters:layoutBoxesIEnumerable<LayoutBox>

The layout boxes to scan; comment-range end marker boxes determine balloon order and anchor positions.

availableSizeSizeF

The available pane size; a fixed left margin is removed from its width for the balloons' connector area.

sectionViewOffsetPointF

The vertical view offset subtracted from marker line positions.

sectionMarginPadding

The section margin whose top inset anchors the balloon layout.

commentTemplateEditorMarginThickness

The margin around the embedded comment editor used when measuring each balloon.

The cached result is reused while availableSize and commentTemplateEditorMargin remain unchanged. Call InvalidateMeasure() when the marker boxes, section offset, or section margin changes.