Interface
IRadTextBlock

Represents a text block in the Telerik UI framework.

Definition

Namespace:Telerik.Windows.Documents.UI.TextBlocks

Assembly:Telerik.Windows.Controls.RichTextBox.dll

Syntax:

cs-api-definition
public interface IRadTextBlock

Properties

FlowDirection

Gets or sets the flow direction of the text block.

Declaration

cs-api-definition
FlowDirection FlowDirection { get; set; }

Property Value

FlowDirection

A FlowDirection value that indicates the direction in which the text flows.

FontFamily

Gets or sets the font family of the text block.

Declaration

cs-api-definition
FontFamily FontFamily { get; set; }

Property Value

FontFamily

The font family to be applied to the text block. This property influences the appearance of the text rendered within the block.

FontSize

Gets or sets the font size of the text block.

Declaration

cs-api-definition
double FontSize { get; set; }

Property Value

double

A double representing the size of the font in device-independent pixels (DIPs).

FontStyle

Gets or sets the font style of the text block.

Declaration

cs-api-definition
FontStyle FontStyle { get; set; }

Property Value

FontStyle

The font style to be applied to the text block. This can specify various styles like normal, italic, or oblique.

FontWeight

Gets or sets the font weight of the text block.

Declaration

cs-api-definition
FontWeight FontWeight { get; set; }

Property Value

FontWeight

ForegroundColor

Gets or sets the foreground color of the text block.

Declaration

cs-api-definition
Color ForegroundColor { get; set; }

Property Value

Color

A Color that represents the foreground color of the text block.

Height

Gets or sets the height of the text block in document units.

Declaration

cs-api-definition
double Height { get; set; }

Property Value

double

A double representing the height of the text block. The value is measured in document units.

Left

Gets or sets the left position of the text block.

Declaration

cs-api-definition
double Left { get; set; }

Property Value

double

A double representing the left position in units relative to the layout's coordinate system.

LineBaselineOffset

Declaration

cs-api-definition
double LineBaselineOffset { get; set; }

Property Value

double

LineHeight

Declaration

cs-api-definition
double LineHeight { get; set; }

Property Value

double

Text

Gets or sets the text content of the RadTextBlock.

Declaration

cs-api-definition
string Text { get; set; }

Property Value

string

The text content as a string.

Top

Gets the vertical position of the top edge of the text block.

Declaration

cs-api-definition
double Top { get; set; }

Property Value

double

Width

Gets or sets the width of the text block.

Declaration

cs-api-definition
double Width { get; set; }

Property Value

double

A double representing the width of the text block in pixels.

Methods

ClearFormattingProperties()

Setting the formatting properties to their default values.

Declaration

cs-api-definition
void ClearFormattingProperties()

ClearInlines()

Clears all inline elements from the text block.

Declaration

cs-api-definition
void ClearInlines()

GetBaselineOffset()

Retrieves the baseline offset of the text block.

Declaration

cs-api-definition
double GetBaselineOffset()

Returns

double

A value of type double representing the baseline offset.

GetBaselineRenderingDifference(double)

Gets the baseline rendering difference for the specified vertical position.

Declaration

cs-api-definition
double GetBaselineRenderingDifference(double lineBaselineOffset)

Parameters

lineBaselineOffset

double

The vertical position used to calculate the baseline rendering difference.

Returns

double

The baseline rendering difference as a double value.

GetUIElement()

Retrieves the user interface element associated with the text block.

Declaration

cs-api-definition
FrameworkElement GetUIElement()

Returns

FrameworkElement

The UI element that represents the text block. This can be used for rendering or interaction purposes.

HasInlines()

Determines whether the current RadTextBlock has any inline elements.

Declaration

cs-api-definition
bool HasInlines()

Returns

bool

True if the RadTextBlock contains inline elements; otherwise, false.

ReleaseAndClearInlines(ObjectPool)

Releases resources and clears any inline elements associated with the text block.

Declaration

cs-api-definition
void ReleaseAndClearInlines(ObjectPool pool)

Parameters

pool

ObjectPool

An instance of the ObjectPool used to manage memory allocation for inlines.

SetClip(Rect?)

Sets the clipping region for the text block.

Declaration

cs-api-definition
void SetClip(Rect? rect)

Parameters

rect

Rect?

The rectangle that defines the clipping region. If null, no clipping will be applied.

SetFormattingProperties(SpanProperties)

Setting the formatting properties from the provided SpanProperties.

Declaration

cs-api-definition
void SetFormattingProperties(SpanProperties spanProperties)

Parameters

spanProperties

SpanProperties

The properties.

SetInlines(IEnumerable<IRadRun>)

Sets the inlines for the text block with the specified collection of runs.

Declaration

cs-api-definition
void SetInlines(IEnumerable<IRadRun> runs)

Parameters

runs

IEnumerable<IRadRun>

An enumerable collection of IRadRun that represents the inlines to be set.