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

Builds selection outlines from clipped document-layout rectangles and appends them to a path geometry.

Definition

Namespace:Telerik.WinForms.Documents.Selection

Assembly:Telerik.WinControls.RichTextEditor.dll

Syntax:

C#
public class SelectionUiPathBuilder

Inheritance: objectSelectionUiPathBuilder

Constructors

Creates a builder that appends selection outlines to the specified path.

C#
public SelectionUiPathBuilder(PathGeometry path)
Parameters:pathPathGeometry

The geometry that receives the generated figures.

Methods

Adds the outline for the full paragraph represented by the supplied layout box.

C#
public void AddParagraphBoxSelection(ParagraphLayoutBox layoutBox)
Parameters:layoutBoxParagraphLayoutBox

The paragraph whose valid inline layout boxes define the selection outline.

Adds the outline for the selected portion of a paragraph, using the starting position only for the first selection block.

C#
public void AddPositionParagraphSelection(ParagraphLayoutBox parentBox, DocumentPosition position, DocumentPosition endPosition, bool isFirstSelectionBlock)
Parameters:parentBoxParagraphLayoutBox

The paragraph containing the selected positions.

positionDocumentPosition

The selection start position, or null when the block starts at the paragraph's first valid inline box.

endPositionDocumentPosition

The selection end position.

isFirstSelectionBlockbool

true when position identifies the starting inline box; otherwise, the paragraph's first valid inline box is used.

Appends the accumulated rectangle outlines as closed, filled figures and starts a new accumulation batch. Vertices are rounded to half-pixel coordinates when added to the path.

C#
public void CloseCurrentFigureAndStartNew()