IRadTextBlock
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
FlowDirection
Gets or sets the flow direction of the text block.
FlowDirection FlowDirection { get; set; }
A FlowDirection value that indicates the direction in which the text flows.
FontFamily
FontFamily
Gets or sets the font family of the text block.
FontFamily FontFamily { get; set; }
The font family to be applied to the text block. This property influences the appearance of the text rendered within the block.
Gets or sets the font size of the text block.
double FontSize { get; set; }
A double representing the size of the font in device-independent pixels (DIPs).
FontStyle
FontStyle
Gets or sets the font style of the text block.
FontStyle FontStyle { get; set; }
The font style to be applied to the text block. This can specify various styles like normal, italic, or oblique.
FontWeight
FontWeight
Gets or sets the font weight of the text block.
FontWeight FontWeight { get; set; }
ForegroundColor
Color
Gets or sets the foreground color of the text block.
Color ForegroundColor { get; set; }
A Color that represents the foreground color of the text block.
Gets or sets the height of the text block in document units.
double Height { get; set; }
A double representing the height of the text block. The value is measured in document units.
Gets or sets the left position of the text block.
double Left { get; set; }
A double representing the left position in units relative to the layout's coordinate system.
double LineBaselineOffset { get; set; }
double LineHeight { get; set; }
Gets or sets the text content of the RadTextBlock.
string Text { get; set; }
The text content as a string.
Methods
Setting the formatting properties to their default values.
void ClearFormattingProperties()
Clears all inline elements from the text block.
void ClearInlines()
Retrieves the baseline offset of the text block.
double GetBaselineOffset()
A value of type double representing the baseline offset.
Gets the baseline rendering difference for the specified vertical position.
GetUIElement()
FrameworkElement
Retrieves the user interface element associated with the text block.
FrameworkElement GetUIElement()
FrameworkElement
The UI element that represents the text block. This can be used for rendering or interaction purposes.
Determines whether the current RadTextBlock has any inline elements.
bool HasInlines()
True if the RadTextBlock contains inline elements; otherwise, false.
Releases resources and clears any inline elements associated with the text block.
void ReleaseAndClearInlines(ObjectPool pool)
An instance of the ObjectPool used to manage memory allocation for inlines.
Sets the clipping region for the text block.
void SetClip(Rect? rect)
The rectangle that defines the clipping region. If null, no clipping will be applied.
Setting the formatting properties from the provided SpanProperties.
void SetFormattingProperties(SpanProperties spanProperties)
The properties.
Sets the inlines for the text block with the specified collection of runs.
void SetInlines(IEnumerable<IRadRun> runs)
An enumerable collection of IRadRun that represents the inlines to be set.