Class Run
Inline text container with character-level formatting properties such as font, size, color, and styles applied to a contiguous text sequence within a paragraph.
Inherited Members
Namespace: Telerik.Windows.Documents.Flow.Model
Assembly: Telerik.Windows.Documents.Flow.dll
Syntax
public sealed class Run : InlineBase, IElementWithStyle, IElementWithProperties
Constructors
Run(RadFlowDocument)
Initializes a new Run with empty text and default character formatting in the specified document.
Declaration
public Run(RadFlowDocument document)
Parameters
|
RadFlowDocument
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
|
StylePropertyDefinition<System.Nullable<BaselineAlignment>>
|
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
|
StylePropertyDefinition<System.Nullable<FlowDirection>>
|
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
|
StylePropertyDefinition<ThemableFontFamily>
|
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
|
StylePropertyDefinition<System.Nullable<System.Double>>
|
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<System.Nullable<System.Windows.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<System.Nullable<System.Windows.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<System.Nullable<System.Windows.Media.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
|
StylePropertyDefinition<System.Nullable<ShadingPattern>>
|
StrikethroughPropertyDefinition
Style property definition for strikethrough decoration, controlling whether a line is drawn through text.
Declaration
public static readonly StylePropertyDefinition<bool? > StrikethroughPropertyDefinition
Field Value
|
StylePropertyDefinition<System.Nullable<System.Boolean>>
|
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
|
StylePropertyDefinition<System.Nullable<UnderlinePattern>>
|
Properties
BaselineAlignment
Vertical positioning of text relative to the baseline, controlling subscript, superscript, or normal alignment.
Declaration
public BaselineAlignment BaselineAlignment { get; set; }
Property Value
|
BaselineAlignment
The default value is |
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
|
FlowDirection
The default value is |
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
|
ThemableFontFamily
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
|
System.Double
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
|
System.Windows.FontStyle
The default value is |
FontWeight
Font weight applied to the text, controlling the boldness or thickness of character strokes.
Declaration
public FontWeight FontWeight { get; set; }
Property Value
|
System.Windows.FontWeight
The default value is |
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
|
ThemableColor
The default value is |
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
|
System.Windows.Media.Color
The default value is |
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
|
CharacterProperties
The properties. |
Shading
Background shading applied to this run, controlling the fill color, pattern, and pattern color behind the text.
Declaration
public Shading Shading { get; }
Property Value
|
Shading
The shading. |
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
|
System.Boolean
The default value is |
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
|
System.String
The style id. |
Implements
Text
Text content of this run; newline characters are automatically removed upon assignment to maintain inline flow.
Declaration
public string Text { get; set; }
Property Value
|
System.String
The text. |
Underline
Underline decoration applied to the text, controlling the pattern, color, and style of the line drawn beneath characters.
Declaration
public Underline Underline { get; }
Property Value
|
Underline
The underline. |
Methods
Clone()
Creates a deep copy of this run with all formatting properties, associated to the same document.
Declaration
public Run Clone()
Returns
|
Run
The cloned element. |
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
|
RadFlowDocument
document
The document to which the cloned element should be associated. |
Returns
|
Run
The cloned element. |
ToString()
Returns the text content of this run for debugging and display purposes.
Declaration
public override string ToString()
Returns
|
System.String
A string that represents the current object. |
Overrides
Explicit Interface Implementations
IElementWithProperties.Properties
Gets the properties.
Declaration
DocumentElementPropertiesBase IElementWithProperties.Properties { get; }
Returns
|
DocumentElementPropertiesBase
The properties. |