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.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

cs-api-definition
public sealed class Run : InlineBase, IElementWithStyle, IElementWithProperties

Inheritance: objectDocumentElementBaseInlineBaseRun

Implements: IElementWithPropertiesIElementWithStyle

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

Constructors

Run(RadFlowDocument)

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

Declaration

cs-api-definition
public Run(RadFlowDocument document)

Parameters

document

RadFlowDocument

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

cs-api-definition
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

cs-api-definition
public static readonly StylePropertyDefinition<BaselineAlignment?> BaselineAlignmentPropertyDefinition

Field Value

StylePropertyDefinition<BaselineAlignment?>

FlowDirectionPropertyDefinition

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

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<FlowDirection?> FlowDirectionPropertyDefinition

Field Value

StylePropertyDefinition<FlowDirection?>

FontFamilyPropertyDefinition

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

Declaration

cs-api-definition
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

cs-api-definition
public static readonly StylePropertyDefinition<double?> FontSizePropertyDefinition

Field Value

StylePropertyDefinition<double?>

FontStylePropertyDefinition

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

Declaration

cs-api-definition
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

cs-api-definition
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

cs-api-definition
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

cs-api-definition
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

cs-api-definition
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

cs-api-definition
public static readonly StylePropertyDefinition<ShadingPattern?> ShadingPatternPropertyDefinition

Field Value

StylePropertyDefinition<ShadingPattern?>

StrikethroughPropertyDefinition

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

Declaration

cs-api-definition
public static readonly StylePropertyDefinition<bool?> StrikethroughPropertyDefinition

Field Value

StylePropertyDefinition<bool?>

UnderlineColorPropertyDefinition

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

Declaration

cs-api-definition
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

cs-api-definition
public static readonly StylePropertyDefinition<UnderlinePattern?> UnderlinePatternPropertyDefinition

Field Value

StylePropertyDefinition<UnderlinePattern?>

Properties

BaselineAlignment

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

Declaration

cs-api-definition
public BaselineAlignment BaselineAlignment { get; set; }

Property Value

BaselineAlignment

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

cs-api-definition
public FlowDirection FlowDirection { get; set; }

Property Value

FlowDirection

The default value is LeftToRight

FontFamily

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

Declaration

cs-api-definition
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

cs-api-definition
public double FontSize { get; set; }

Property Value

double

The size of the font.

FontStyle

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

Declaration

cs-api-definition
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

cs-api-definition
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

cs-api-definition
public ThemableColor ForegroundColor { get; set; }

Property Value

ThemableColor

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

cs-api-definition
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

cs-api-definition
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

cs-api-definition
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

cs-api-definition
public bool Strikethrough { get; set; }

Property Value

bool

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

cs-api-definition
public string StyleId { get; set; }

Property Value

string

The style id.

Implements IElementWithStyle.StyleId

Text

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

Declaration

cs-api-definition
public string Text { get; set; }

Property Value

string

The text.

Underline

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

Declaration

cs-api-definition
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

cs-api-definition
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

cs-api-definition
public Run Clone(RadFlowDocument document)

Parameters

document

RadFlowDocument

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

cs-api-definition
public override string ToString()

Returns

string

A string that represents the current object.

Overrides object.ToString()