New to Telerik Document Processing? Start a free 30-day trial

Run

Class

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.Documents.Flow.Model

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

C#
public sealed class Run : InlineBase, IElementWithStyle, IElementWithProperties

Inheritance: objectDocumentElementBaseInlineBaseRun

Implements: IElementWithPropertiesIElementWithStyle

Inherited Members InlineBase.ParagraphDocumentElementBase.EnumerateChildrenOfType<T>()DocumentElementBase.DocumentDocumentElementBase.Parent

Constructors

Initializes a new Run with empty text and default character formatting in the specified document.

C#
public Run(RadFlowDocument document)
Parameters:documentRadFlowDocument

The document in which the element will be added.

Fields

Style property definition for background fill color behind text, distinct from highlight color in rendering.

C#
public static readonly StylePropertyDefinition<ThemableColor> BackgroundColorPropertyDefinition

Style property definition for vertical text positioning relative to the baseline, enabling subscript and superscript effects.

C#
public static readonly StylePropertyDefinition<BaselineAlignment?> BaselineAlignmentPropertyDefinition

Style property definition for text flow direction, controlling left-to-right or right-to-left character layout for bidirectional text.

C#
public static readonly StylePropertyDefinition<FlowDirection?> FlowDirectionPropertyDefinition

Style property definition for font family, supporting theme-aware fonts that adapt to document themes.

C#
public static readonly StylePropertyDefinition<ThemableFontFamily> FontFamilyPropertyDefinition

Style property definition for font size in device independent pixels (1/96 inch), validated to ensure positive values only.

C#
public static readonly StylePropertyDefinition<double?> FontSizePropertyDefinition

Style property definition for font style (normal or italic), validated to ensure only Normal and Italic values are allowed.

C#
public static readonly StylePropertyDefinition<FontStyle?> FontStylePropertyDefinition

Style property definition for font weight (normal or bold), validated to ensure only Normal and Bold values are allowed.

C#
public static readonly StylePropertyDefinition<FontWeight?> FontWeightPropertyDefinition

Style property definition for text color, supporting theme-aware colors that adapt to document themes.

C#
public static readonly StylePropertyDefinition<ThemableColor> ForegroundColorPropertyDefinition

Style property definition for highlight color, controlling the marker effect drawn behind text.

C#
public static readonly StylePropertyDefinition<Color?> HighlightColorPropertyDefinition

Style property definition for shading pattern color, controlling the foreground color used in patterned background fills.

C#
public static readonly StylePropertyDefinition<ThemableColor> ShadingPatternColorPropertyDefinition

Style property definition for shading pattern, controlling the fill pattern applied to the text background.

C#
public static readonly StylePropertyDefinition<ShadingPattern?> ShadingPatternPropertyDefinition

Style property definition for strikethrough decoration, controlling whether a line is drawn through text.

C#
public static readonly StylePropertyDefinition<bool?> StrikethroughPropertyDefinition

Style property definition for underline color, controlling the color of the line drawn beneath text.

C#
public static readonly StylePropertyDefinition<ThemableColor> UnderlineColorPropertyDefinition

Style property definition for underline pattern, controlling the style of line drawn beneath text (single, double, dashed, etc.).

C#
public static readonly StylePropertyDefinition<UnderlinePattern?> UnderlinePatternPropertyDefinition

Properties

Vertical positioning of text relative to the baseline, controlling subscript, superscript, or normal alignment.

C#
public BaselineAlignment BaselineAlignment { get; set; }
Property Value:

The default value is Baseline.

Text flow direction for this run, controlling whether characters are laid out left-to-right or right-to-left for bidirectional text support.

C#
public FlowDirection FlowDirection { get; set; }
Property Value:

The default value is LeftToRight

Font family applied to the text, supporting theme-aware fonts that adapt to the document's theme.

C#
public ThemableFontFamily FontFamily { get; set; }
Property Value:

The font family.

Font size applied to the text in device independent pixels (1/96 inch), controlling the height of characters.

C#
public double FontSize { get; set; }
Property Value:

The size of the font.

FontStyle

FontStyle

Font style applied to the text, controlling whether characters appear in normal or italic posture.

C#
public FontStyle FontStyle { get; set; }
Property Value:

The default value is Normal.

FontWeight

FontWeight

Font weight applied to the text, controlling the boldness or thickness of character strokes.

C#
public FontWeight FontWeight { get; set; }
Property Value:

The default value is Normal.

Text color applied to characters in this run, supporting theme-aware colors that adapt to the document's theme.

C#
public ThemableColor ForegroundColor { get; set; }
Property Value:

The default value is black.

Highlight color applied behind the text as a marker effect, similar to a highlighter pen over printed text.

C#
public Color HighlightColor { get; set; }
Property Value:

The default value is Transparent.

Character formatting properties for this run, providing access to font, color, size, weight, style, and text decoration settings.

C#
public CharacterProperties Properties { get; }
Property Value:

The properties.

Background shading applied to this run, controlling the fill color, pattern, and pattern color behind the text.

C#
public Shading Shading { get; }
Property Value:

The shading.

Controls whether a horizontal line is drawn through the middle of the text to indicate deletion or emphasis.

C#
public bool Strikethrough { get; set; }
Property Value:

The default value is false.

Character style identifier applied to this run, enabling consistent formatting via style inheritance from the document's style repository.

C#
public string StyleId { get; set; }
Property Value:

The style id.

Implements: IElementWithStyle.StyleId

Text content of this run; newline characters are automatically removed upon assignment to maintain inline flow.

C#
public string Text { get; set; }
Property Value:

The text.

Underline decoration applied to the text, controlling the pattern, color, and style of the line drawn beneath characters.

C#
public Underline Underline { get; }
Property Value:

The underline.

Methods

Creates a deep copy of this run with all formatting properties, associated to the same document.

C#
public Run Clone()
Returns:

Run

The cloned element.

Creates a deep copy of this run with all formatting properties, associated to the specified document for cross-document copying.

C#
public Run Clone(RadFlowDocument document)
Parameters:documentRadFlowDocument

The document to which the cloned element should be associated.

Returns:

Run

The cloned element.

Returns the text content of this run for debugging and display purposes.

C#
public override string ToString()
Returns:

string

A string that represents the current object.

Overrides: object.ToString()