CharacterProperties
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
Namespace:Telerik.Windows.Documents.Flow.Model.Styles
Assembly:Telerik.Windows.Documents.Flow.dll
Syntax:
public sealed class CharacterProperties : DocumentElementPropertiesBase, IElementWithStyle, IPropertiesWithShading
Inheritance: objectDocumentElementPropertiesBaseCharacterProperties
Implements:
Inherited Members
Methods
Enumerates the style properties.
protected override IEnumerable<IStyleProperty> EnumerateStyleProperties()
The style properties.
Overrides:
Gets specific style property or null.
protected override IStyleProperty GetStylePropertyOverride(IStylePropertyDefinition propertyDefinition)
The property definition.
Returns:Overrides:
Properties
BackgroundColor
IStyleProperty<ThemableColor>
Gets or sets the solid background color behind text, which combines with shading patterns when both are applied.
public IStyleProperty<ThemableColor> BackgroundColor { get; }
The color of the background.
Implements:
Gets or sets the vertical alignment of text relative to the baseline, controlling superscript and subscript positioning.
public IStyleProperty<BaselineAlignment?> BaselineAlignment { get; }
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.
public IStyleProperty<FlowDirection?> FlowDirection { get; }
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.
public IStyleProperty<ThemableFontFamily> FontFamily { get; }
The font family.
Gets or sets the font size in device-independent pixels (1/96 inch), controlling text height in the rendered document.
public IStyleProperty<double?> FontSize { get; }
The size of the font.
FontStyle
IStyleProperty<FontStyle?>
Gets or sets the font style (normal or italic) applied to text, determining the slant or posture of characters.
public IStyleProperty<FontStyle?> FontStyle { get; }
The default value is Normal.
FontWeight
IStyleProperty<FontWeight?>
Gets or sets the font weight (boldness) applied to text, controlling the thickness of character strokes.
public IStyleProperty<FontWeight?> FontWeight { get; }
The default value is Normal.
ForegroundColor
IStyleProperty<ThemableColor>
Gets or sets the foreground (text) color, supporting both explicit color values and theme-aware colors that adapt to the document's color scheme.
public IStyleProperty<ThemableColor> ForegroundColor { get; }
The default value is black.
HighlightColor
IStyleProperty<Color?>
Gets or sets the highlight color applied behind text, simulating a text marker or highlighter pen effect.
public IStyleProperty<Color?> HighlightColor { get; }
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.
public IStyleProperty<ShadingPattern?> ShadingPattern { get; }
The default value is Clear
Implements:
ShadingPatternColor
IStyleProperty<ThemableColor>
Gets or sets the foreground color for shading patterns, which is layered over the background color according to the specified pattern style.
public IStyleProperty<ThemableColor> ShadingPatternColor { get; }
The color of the pattern.
Implements:
Gets or sets whether a horizontal line is drawn through the middle of the text, indicating deletion or emphasis.
public IStyleProperty<bool?> Strikethrough { get; }
The default value is false.
UnderlineColor
IStyleProperty<ThemableColor>
Gets or sets the color of the underline decoration, which can differ from the text foreground color.
public IStyleProperty<ThemableColor> UnderlineColor { get; }
The color.
Gets or sets the underline pattern style (single, double, dashed, wavy, etc.) applied beneath the text.
public IStyleProperty<UnderlinePattern?> UnderlinePattern { get; }
The default value is None