ClassRun
Inline text container with character-level formatting properties such as font, size, color, and styles applied to a contiguous text sequence within a paragraph.
Definition
Namespace:Telerik.Windows.Documents.Flow.Model
Assembly:Telerik.Windows.Documents.Flow.dll
Syntax:
public sealed class Run : InlineBase, IElementWithStyle, IElementWithProperties
Inheritance: objectDocumentElementBaseInlineBaseRun
Implements:
Inherited Members
Constructors
Run(RadFlowDocument)
Initializes a new Run with empty text and default character formatting in the specified document.
Declaration
public Run(RadFlowDocument document)
Parameters
document
The document in which the element will be added.
Fields
BackgroundColorPropertyDefinition
Style property definition for background fill color behind text, distinct from highlight color in rendering.
Declaration
public static readonly StylePropertyDefinition<ThemableColor> BackgroundColorPropertyDefinition
Field Value
StylePropertyDefinition<ThemableColor>
BaselineAlignmentPropertyDefinition
Style property definition for vertical text positioning relative to the baseline, enabling subscript and superscript effects.
Declaration
public static readonly StylePropertyDefinition<BaselineAlignment?> BaselineAlignmentPropertyDefinition
Field Value
FlowDirectionPropertyDefinition
Style property definition for text flow direction, controlling left-to-right or right-to-left character layout for bidirectional text.
Declaration
public static readonly StylePropertyDefinition<FlowDirection?> FlowDirectionPropertyDefinition
Field Value
FontFamilyPropertyDefinition
Style property definition for font family, supporting theme-aware fonts that adapt to document themes.
Declaration
public static readonly StylePropertyDefinition<ThemableFontFamily> FontFamilyPropertyDefinition
Field Value
FontSizePropertyDefinition
Style property definition for font size in device independent pixels (1/96 inch), validated to ensure positive values only.
Declaration
public static readonly StylePropertyDefinition<double?> FontSizePropertyDefinition
Field Value
FontStylePropertyDefinition
Style property definition for font style (normal or italic), validated to ensure only Normal and Italic values are allowed.
Declaration
public static readonly StylePropertyDefinition<FontStyle?> FontStylePropertyDefinition
Field Value
StylePropertyDefinition<FontStyle?>
FontWeightPropertyDefinition
Style property definition for font weight (normal or bold), validated to ensure only Normal and Bold values are allowed.
Declaration
public static readonly StylePropertyDefinition<FontWeight?> FontWeightPropertyDefinition
Field Value
StylePropertyDefinition<FontWeight?>
ForegroundColorPropertyDefinition
Style property definition for text color, supporting theme-aware colors that adapt to document themes.
Declaration
public static readonly StylePropertyDefinition<ThemableColor> ForegroundColorPropertyDefinition
Field Value
StylePropertyDefinition<ThemableColor>
HighlightColorPropertyDefinition
Style property definition for highlight color, controlling the marker effect drawn behind text.
Declaration
public static readonly StylePropertyDefinition<Color?> HighlightColorPropertyDefinition
Field Value
StylePropertyDefinition<Color?>
ShadingPatternColorPropertyDefinition
Style property definition for shading pattern color, controlling the foreground color used in patterned background fills.
Declaration
public static readonly StylePropertyDefinition<ThemableColor> ShadingPatternColorPropertyDefinition
Field Value
StylePropertyDefinition<ThemableColor>
ShadingPatternPropertyDefinition
Style property definition for shading pattern, controlling the fill pattern applied to the text background.
Declaration
public static readonly StylePropertyDefinition<ShadingPattern?> ShadingPatternPropertyDefinition
Field Value
StrikethroughPropertyDefinition
Style property definition for strikethrough decoration, controlling whether a line is drawn through text.
Declaration
public static readonly StylePropertyDefinition<bool?> StrikethroughPropertyDefinition
Field Value
UnderlineColorPropertyDefinition
Style property definition for underline color, controlling the color of the line drawn beneath text.
Declaration
public static readonly StylePropertyDefinition<ThemableColor> UnderlineColorPropertyDefinition
Field Value
StylePropertyDefinition<ThemableColor>
UnderlinePatternPropertyDefinition
Style property definition for underline pattern, controlling the style of line drawn beneath text (single, double, dashed, etc.).
Declaration
public static readonly StylePropertyDefinition<UnderlinePattern?> UnderlinePatternPropertyDefinition
Field Value
Properties
BaselineAlignment
Vertical positioning of text relative to the baseline, controlling subscript, superscript, or normal alignment.
Declaration
public BaselineAlignment BaselineAlignment { get; set; }
Property Value
The default value is Baseline.
FlowDirection
Text flow direction for this run, controlling whether characters are laid out left-to-right or right-to-left for bidirectional text support.
Declaration
public FlowDirection FlowDirection { get; set; }
Property Value
The default value is LeftToRight
FontFamily
Font family applied to the text, supporting theme-aware fonts that adapt to the document's theme.
Declaration
public ThemableFontFamily FontFamily { get; set; }
Property Value
The font family.
FontSize
Font size applied to the text in device independent pixels (1/96 inch), controlling the height of characters.
Declaration
public double FontSize { get; set; }
Property Value
The size of the font.
FontStyle
Font style applied to the text, controlling whether characters appear in normal or italic posture.
Declaration
public FontStyle FontStyle { get; set; }
Property Value
FontStyle
The default value is Normal.
FontWeight
Font weight applied to the text, controlling the boldness or thickness of character strokes.
Declaration
public FontWeight FontWeight { get; set; }
Property Value
FontWeight
The default value is Normal.
ForegroundColor
Text color applied to characters in this run, supporting theme-aware colors that adapt to the document's theme.
Declaration
public ThemableColor ForegroundColor { get; set; }
Property Value
The default value is black.
HighlightColor
Highlight color applied behind the text as a marker effect, similar to a highlighter pen over printed text.
Declaration
public Color HighlightColor { get; set; }
Property Value
Color
The default value is Transparent.
Properties
Character formatting properties for this run, providing access to font, color, size, weight, style, and text decoration settings.
Declaration
public CharacterProperties Properties { get; }
Property Value
The properties.
Shading
Background shading applied to this run, controlling the fill color, pattern, and pattern color behind the text.
Strikethrough
Controls whether a horizontal line is drawn through the middle of the text to indicate deletion or emphasis.
Declaration
public bool Strikethrough { get; set; }
Property Value
The default value is false.
StyleId
Character style identifier applied to this run, enabling consistent formatting via style inheritance from the document's style repository.
Declaration
public string StyleId { get; set; }
Property Value
The style id.
Implements
Text
Text content of this run; newline characters are automatically removed upon assignment to maintain inline flow.
Methods
Clone()
Creates a deep copy of this run with all formatting properties, associated to the same document.
Clone(RadFlowDocument)
Creates a deep copy of this run with all formatting properties, associated to the specified document for cross-document copying.
Declaration
public Run Clone(RadFlowDocument document)
Parameters
document
The document to which the cloned element should be associated.
Returns
The cloned element.
ToString()
Returns the text content of this run for debugging and display purposes.
Declaration
public override string ToString()
Returns
A string that represents the current object.
Overrides