New to Telerik UI for WinFormsStart a free 30-day trial

Represent the selection paiting primitive

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class TextBoxSelectionPrimitive : IPrimitive

Inheritance: objectTextBoxSelectionPrimitive

Implements: IPrimitive

Constructors

Initializes a new instance of the TextBoxSelectionPrimitive class.

C#
public TextBoxSelectionPrimitive(RadTextBoxControlElement textBox)
Parameters:textBoxRadTextBoxControlElement

The text box.

Properties

Gets or sets a value indicating whether the selection should be hidden if focused is lost

C#
public bool HideSelection { get; set; }
Property Value:

true if [hide selection]; otherwise, false.

Gets or sets the color of the selection.

C#
public Color SelectionColor { get; set; }
Property Value:

The color of the selection.

Gets or sets the selection opacity.

C#
public int SelectionOpacity { get; set; }
Property Value:

The selection opacity.

Gets or sets a value indicating whether the primitive should be painted be painted.

C#
public bool ShouldPaint { get; set; }

Implements: IPrimitive.ShouldPaint

Gets the associated text box element.

C#
public RadTextBoxControlElement TextBoxElement { get; }

Methods

Gets the rectangle of LineInfo

C#
protected virtual RectangleF GetRectangle(LineInfo currentLine)
Parameters:currentLineLineInfo

The current line.

Returns:

RectangleF

Invalidates the specified selection start.

C#
public virtual void Invalidate(TextPosition selectionStart, TextPosition selectionEnd, bool repaint)
Parameters:selectionStartTextPosition

The selection start.

selectionEndTextPosition

The selection end.

repaintbool

if set to true [repaint].

Draws the primitive on the screen.

C#
public virtual void PaintPrimitive(IGraphics graphics, float angle, SizeF scale)
Parameters:graphicsIGraphicsanglefloatscaleSizeF

Implements: IPrimitive.PaintPrimitive(IGraphics, float, SizeF)