New to Telerik Document ProcessingStart a free 30-day trial

Manages character-level formatting (font, size, color, underline, shading) for inline text. Apply to Run elements or character styles to control text appearance with support for theme-aware colors and fonts.

Definition

Methods

Enumerates the style properties.

C#
protected override IEnumerable<IStyleProperty> EnumerateStyleProperties()
Returns:

IEnumerable<IStyleProperty>

The style properties.

Overrides: DocumentElementPropertiesBase.EnumerateStyleProperties()

Gets specific style property or null.

C#
protected override IStyleProperty GetStylePropertyOverride(IStylePropertyDefinition propertyDefinition)
Parameters:propertyDefinitionIStylePropertyDefinition

The property definition.

Returns:

IStyleProperty

Overrides: DocumentElementPropertiesBase.GetStylePropertyOverride(IStylePropertyDefinition)

Properties

Gets or sets the solid background color behind text, which combines with shading patterns when both are applied.

C#
public IStyleProperty<ThemableColor> BackgroundColor { get; }
Property Value:

The color of the background.

Implements: IPropertiesWithShading.BackgroundColor

Gets or sets the vertical alignment of text relative to the baseline, controlling superscript and subscript positioning.

C#
public IStyleProperty<BaselineAlignment?> BaselineAlignment { get; }
Property Value:

The default value is Baseline.

Gets or sets the text flow direction, controlling whether text reads left-to-right or right-to-left for multilingual document support.

C#
public IStyleProperty<FlowDirection?> FlowDirection { get; }
Property Value:

The default value is LeftToRight

FontFamily

IStyleProperty<ThemableFontFamily>

Gets or sets the font family applied to text, supporting both explicit font names and theme-aware font references that adapt to the document's theme.

C#
public IStyleProperty<ThemableFontFamily> FontFamily { get; }
Property Value:

The font family.

Gets or sets the font size in device-independent pixels (1/96 inch), controlling text height in the rendered document.

C#
public IStyleProperty<double?> FontSize { get; }
Property Value:

The size of the font.

Gets or sets the font style (normal or italic) applied to text, determining the slant or posture of characters.

C#
public IStyleProperty<FontStyle?> FontStyle { get; }
Property Value:

The default value is Normal.

Gets or sets the font weight (boldness) applied to text, controlling the thickness of character strokes.

C#
public IStyleProperty<FontWeight?> FontWeight { get; }
Property Value:

The default value is Normal.

Gets or sets the foreground (text) color, supporting both explicit color values and theme-aware colors that adapt to the document's color scheme.

C#
public IStyleProperty<ThemableColor> ForegroundColor { get; }
Property Value:

The default value is black.

Gets or sets the highlight color applied behind text, simulating a text marker or highlighter pen effect.

C#
public IStyleProperty<Color?> HighlightColor { get; }
Property Value:

The default value is Transparent.

Gets or sets the pattern style used to combine the shading pattern color with the background color, enabling effects like diagonal stripes or dots.

C#
public IStyleProperty<ShadingPattern?> ShadingPattern { get; }
Property Value:

The default value is Clear

Implements: IPropertiesWithShading.ShadingPattern

Gets or sets the foreground color for shading patterns, which is layered over the background color according to the specified pattern style.

C#
public IStyleProperty<ThemableColor> ShadingPatternColor { get; }
Property Value:

The color of the pattern.

Implements: IPropertiesWithShading.ShadingPatternColor

Gets or sets whether a horizontal line is drawn through the middle of the text, indicating deletion or emphasis.

C#
public IStyleProperty<bool?> Strikethrough { get; }
Property Value:

The default value is false.

Gets or sets the color of the underline decoration, which can differ from the text foreground color.

C#
public IStyleProperty<ThemableColor> UnderlineColor { get; }
Property Value:

The color.

Gets or sets the underline pattern style (single, double, dashed, wavy, etc.) applied beneath the text.

C#
public IStyleProperty<UnderlinePattern?> UnderlinePattern { get; }
Property Value:

The default value is None