InterfaceIRadTextBlock
Represents a text block in the Telerik UI framework.
Definition
Namespace:Telerik.Windows.Documents.UI.TextBlocks
Assembly:Telerik.Windows.Controls.RichTextBox.dll
Syntax:
public interface IRadTextBlock
Properties
FlowDirection
Gets or sets the flow direction of the text block.
Declaration
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
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
double FontSize { get; set; }
Property Value
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
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
FontWeight FontWeight { get; set; }
Property Value
FontWeight
ForegroundColor
Gets or sets the foreground color of the text block.
Declaration
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
double Height { get; set; }
Property Value
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
double Left { get; set; }
Property Value
A double representing the left position in units relative to the layout's coordinate system.
Text
Gets or sets the text content of the RadTextBlock.
Declaration
string Text { get; set; }
Property Value
The text content as a string.
Top
Gets the vertical position of the top edge of the text block.
Methods
ClearFormattingProperties()
Setting the formatting properties to their default values.
Declaration
void ClearFormattingProperties()
ClearInlines()
Clears all inline elements from the text block.
Declaration
void ClearInlines()
GetBaselineOffset()
Retrieves the baseline offset of the text block.
Declaration
double GetBaselineOffset()
Returns
A value of type double representing the baseline offset.
GetBaselineRenderingDifference(double)
Gets the baseline rendering difference for the specified vertical position.
GetUIElement()
Retrieves the user interface element associated with the text block.
Declaration
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
bool HasInlines()
Returns
True if the RadTextBlock contains inline elements; otherwise, false.
ReleaseAndClearInlines(ObjectPool)
Releases resources and clears any inline elements associated with the text block.
Declaration
void ReleaseAndClearInlines(ObjectPool pool)
Parameters
pool
An instance of the ObjectPool used to manage memory allocation for inlines.
SetClip(Rect?)
Sets the clipping region for the text block.
Declaration
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
void SetFormattingProperties(SpanProperties spanProperties)
Parameters
spanProperties
The properties.
SetInlines(IEnumerable<IRadRun>)
Sets the inlines for the text block with the specified collection of runs.
Declaration
void SetInlines(IEnumerable<IRadRun> runs)
Parameters
runs
An enumerable collection of IRadRun that represents the inlines to be set.