TinyHTMLParsers
Parses the supported lightweight HTML-like markup used by text primitives into formatted text blocks.
Definition
Namespace:Telerik.WinControls.TextPrimitiveUtils
Assembly:Telerik.WinControls.dll
Syntax:
public class TinyHTMLParsers
Inheritance: objectTinyHTMLParsers
Constructors
public TinyHTMLParsers()
Properties
Gets or sets the color used to display a visited hyperlink.
public static Color LinkClickedColor { get; set; }
Methods
Parse single HTML tag and apply settings
public static bool ApplyHTMLSettingsFromTag(ref FormattedText currentFormattedText, FormattedText prevText, string htmlTag, TinyHTMLParsers.TinyHTMLParsersData parserData, ref bool shouldProduceNewLine, ref string text)
Main function for parsing process
public static FormattedTextBlock Parse(string text, Color baseForeColor, string baseFont, float fontSize, ContentAlignment aligment)
text to parse
baseForeColorColorbase Font color
baseFontstringbase font
fontSizefloatbase font size
aligmentContentAlignmentbase textaligment
Returns:Formatted text block that contains the whole structure
Main function for parsing process
public static FormattedTextBlock Parse(string text, Color baseForeColor, string baseFont, float fontSize, FontStyle fontStyle, ContentAlignment aligment)
text to parse
baseForeColorColorbase Font color
baseFontstringbase font
fontSizefloatbase font size
fontStyleFontStylebase font style etc. Regular, Bold
aligmentContentAlignmentbase textaligment
Returns:Formatted text block that contains the whole structure
Parses text using the content, color, font, size, style, and alignment from the supplied parameters.
public static FormattedTextBlock Parse(TextParams textParams)
The text and base formatting settings for the parsed block.
Returns:A formatted block containing the parsed text segments and lines.