FormattedTextBlock
Holds formatted text segments grouped into lines for HTML-capable text measurement and painting.
Definition
Namespace:Telerik.WinControls.TextPrimitiveUtils
Assembly:Telerik.WinControls.dll
Syntax:
public class FormattedTextBlock
Inheritance: objectFormattedTextBlock
Constructors
public FormattedTextBlock()
Properties
Methods
Calculate Size of the whole FormattedTextBlock
public SizeF GetTextSize(SizeF proposedSize, bool useCompatibleTextRendering, StringFormat sf, TextFormatFlags textFormatFlags, bool textWrap)
Measures the current segments, optionally splitting and arranging them when textParams enables wrapping.
public SizeF GetTextSize(SizeF proposedSize, TextParams textParams)
The available size used when arranging wrapped lines.
textParamsTextParamsThe text settings that determine formatting and whether wrapping is enabled.
Returns:The maximum line width and the sum of the measured line heights.
Occurs when the mouse pointer is moved over the element.
Occurs when the mouse is up the element.
Draw whole FormattedTextBlock
public void PaintFormatTextBlock(IGraphics graphics, RectangleF paintingRectangleParam, bool useCompatibleTextRendering, StringFormat format, TextFormatFlags flags, bool textWrap, bool clipText)
Splits text at literal spaces into word-sized segments, retaining at most one leading space; trailing whitespace is trimmed from a line's last segment only when it contains text.