Interface IRadTextBlock
Represents a text block in the Telerik UI framework.
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
System.Windows.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
System.Windows.Media.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
System.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
FontStyle FontStyle { get; set; }
Property Value
System.Windows.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
System.Windows.FontWeight
|
ForegroundColor
Gets or sets the foreground color of the text block.
Declaration
Color ForegroundColor { get; set; }
Property Value
System.Windows.Media.Color
A System.Windows.Media.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
System.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
double Left { get; set; }
Property Value
System.Double
A double representing the left position in units relative to the layout's coordinate system. |
LineBaselineOffset
Declaration
double LineBaselineOffset { get; set; }
Property Value
System.Double
|
LineHeight
Declaration
double LineHeight { get; set; }
Property Value
System.Double
|
Text
Gets or sets the text content of the RadTextBlock.
Declaration
string Text { get; set; }
Property Value
System.String
The text content as a string. |
Top
Gets the vertical position of the top edge of the text block.
Declaration
double Top { get; set; }
Property Value
System.Double
|
Width
Gets or sets the width of the text block.
Declaration
double Width { get; set; }
Property Value
System.Double
A double representing the width of the text block in pixels. |
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
System.Double
A value of type |
GetBaselineRenderingDifference(Double)
Gets the baseline rendering difference for the specified vertical position.
Declaration
double GetBaselineRenderingDifference(double lineBaselineOffset)
Parameters
System.Double
lineBaselineOffset
The vertical position used to calculate the baseline rendering difference. |
Returns
System.Double
The baseline rendering difference as a double value. |
GetUIElement()
Retrieves the user interface element associated with the text block.
Declaration
FrameworkElement GetUIElement()
Returns
System.Windows.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
System.Boolean
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
ObjectPool
pool
An instance of the ObjectPool used to manage memory allocation for inlines. |
SetClip(Nullable<Rect>)
Sets the clipping region for the text block.
Declaration
void SetClip(Nullable<Rect> rect)
Parameters
System.Nullable<System.Windows.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
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
System.Collections.Generic.IEnumerable<IRadRun>
runs
An enumerable collection of IRadRun that represents the inlines to be set. |