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

Represents text measurer of RadTextBoxControlElement.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.UI.dll

Syntax:

C#
public class TextBoxControlMeasurer

Inheritance: objectTextBoxControlMeasurer

Constructors

C#
public TextBoxControlMeasurer()

Fields

C#
public const TextFormatFlags FormatFlags = SingleLine | NoClipping | NoPrefix | PreserveGraphicsClipping | PreserveGraphicsTranslateTransform | NoPadding
C#
public const TextRenderingHint StringRenderingHint = SystemDefault
C#
public const int TabSize = 4

Methods

Searches the text's index where the caret should be positioned

C#
public static int BinarySearchCaretIndex(string text, Font font, double availableWidth)
Parameters:textstring

The text.

fontFont

The font.

availableWidthdouble

The available width.

Returns:

int

Search the index position where the text should be wrapped for the available width.

C#
public static int BinarySearchWrapIndex(string text, Font font, float availableWidth)
Parameters:textstring

The text.

fontFont

The font.

availableWidthfloat

The available width.

Returns:

int

Measures a text.

C#
public static Size MeasureText(string text, Font font)
Parameters:textstring

The text.

fontFont

The font.

Returns:

Size