IRadTextBlock
Provides a platform-neutral text block for positioning text and formatted inline runs in document UI layers.
Definition
Namespace:Telerik.WinForms.Documents.UI.TextBlocks
Assembly:Telerik.WinControls.RadSpreadsheet.dll
Syntax:
public interface IRadTextBlock
Properties
Gets or sets the directional context used to lay out the block's text.
FlowDirection FlowDirection { get; set; }
Gets or sets the base font family used for block text and inline runs without their own family.
FontFamily FontFamily { get; set; }
Gets or sets the base font size. The Spreadsheet adapter assigns this size to inline runs during measurement.
double FontSize { get; set; }
Gets or sets the font style applied to inline runs during Spreadsheet text-block measurement.
FontStyle FontStyle { get; set; }
Gets or sets the base font weight used for block text.
FontWeight FontWeight { get; set; }
Gets or sets the foreground color used for block text.
Color ForegroundColor { get; set; }
Gets or sets the height allocated to this block by line layout.
double Height { get; set; }
Gets or sets the baseline offset supplied by line layout; the Spreadsheet text-block renderer uses it to shift the text vertically when painting.
double LineBaselineOffset { get; set; }
Gets or sets the paragraph line height supplied by line layout. The Spreadsheet text-block implementation stores this value but does not use it to calculate measured height.
double LineHeight { get; set; }
Gets or sets unformatted block text. Use SetInlines(IEnumerable<IRadRun>) to supply separately formatted runs.
string Text { get; set; }
Gets or sets whether text is wrapped within the block's assigned bounds. The Spreadsheet adapter does not account for wrapping when measuring the text block.
TextWrapping TextWrapping { get; set; }
Methods
Removes all inline runs without returning their adapters to an object pool.
void ClearInlines()
Returns the rendered text baseline's offset from the top of the block.
Calculates the vertical correction between the line-layout baseline and the rendered text baseline. The Spreadsheet implementation returns zero because it does not calculate an additional correction.
Gets the framework element that a UI layer should arrange and render for this block.
Determines whether the block currently contains inline runs.
Removes inline runs, returns their adapters to the supplied pool, and resets the block's font defaults for reuse.
void ReleaseAndClearInlines(ObjectPool pool)
The pool that receives the released run adapters.
Appends runs in enumeration order; existing inline runs are not removed.