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

Carries text, bounds, formatting, and rendering options from a text primitive to its renderer.

Definition

Namespace:Telerik.WinControls.Primitives

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class TextParams

Inheritance: objectTextParams

Constructors

C#
public TextParams()

Fields

The text alignment used for drawing and measurement.

C#
public ContentAlignment alignment

Requests end ellipsis when text does not fit its drawing area.

C#
public bool autoEllipsis

The background color used by the disabled or forced-background drawing path.

C#
public Color backColor

Controls whether the HTML-capable and compatible-rendering paths clip text to the drawing area.

C#
public bool ClipText

Indicates whether the source element is enabled, which affects disabled-state drawing.

C#
public bool enabled

Requests flipped text in the compatible rendering path.

C#
public bool flipText

The font used to measure and draw the text.

C#
public Font font

Forces the GDI text path that draws against backColor, even when enabled.

C#
public bool forceBackColor

The foreground color used to draw the text.

C#
public Color foreColor

The background color filled behind the character ranges specified by highlightRanges.

C#
public Color highlightColor

Character ranges in text whose measured bounds are filled with highlightColor before drawing the text.

C#
public CharacterRange[] highlightRanges

Requests the LineLimit flag when creating a string format.

C#
public bool lineLimit

Includes trailing spaces in compatible-rendering measurement.

C#
public bool measureTrailingSpaces

The rectangle available for drawing text.

C#
public RectangleF paintingRectangle

Enables right-to-left text direction and alignment.

C#
public bool rightToLeft

The shadow settings passed to the compatible text-rendering path.

C#
public ShadowSettings shadow

Controls whether mnemonic underlines are shown when mnemonics are enabled.

C#
public bool showKeyboardCues

Carries the source element's horizontal-stretch setting; built-in text renderers do not consume it.

C#
public bool stretchHorizontally

The text to measure or draw.

C#
public string text

The horizontal or vertical text orientation.

C#
public Orientation textOrientation

The rendering hint applied to the graphics context.

C#
public TextRenderingHint textRenderingHint

Allows text to wrap within its available width.

C#
public bool textWrap

Selects compatible GDI+ text rendering instead of the WinForms text renderer.

C#
public bool useCompatibleTextRendering

Controls whether ampersands introduce mnemonic markers.

C#
public bool useMnemonic

Methods

Creates a StringFormat from this instance's alignment, direction, ellipsis, line-limit, mnemonic, trailing-space, wrapping, and clipping settings.

C#
public virtual StringFormat CreateStringFormat()
Returns:

StringFormat

A new format object; the caller is responsible for disposing it.