TextProperties
Text formatting state for runs—controls font, size, rendering mode, spacing, decorations, highlight, and baseline alignment used when drawing text. Configure before inserting text to affect subsequent layout and rendering.
Definition
Namespace:Telerik.Windows.Documents.Fixed.Model.Editing
Assembly:Telerik.Windows.Documents.Fixed.dll
Syntax:
public class TextProperties : PropertiesBase<TextProperties>
Inheritance: objectPropertiesBase<TextProperties>TextProperties
Inherited Members
Constructors
Initializes a new instance of the TextProperties class.
public TextProperties()
Fields
Gets or sets the baseline alignment which controls the vertical positioning of text relative to the baseline. This allows for creating subscripts, superscripts, or other vertical text alignments.
public BaselineAlignment BaselineAlignment
A BaselineAlignment enumeration value that determines the vertical position of text relative to the baseline.
Gets or sets the spacing between characters, measured in device-independent units. Positive values increase spacing, while negative values decrease spacing.
public double? CharacterSpacing
A nullable double value that specifies the additional space between characters.
Gets or sets the size of the font in points.
public double FontSize
A double value representing the font size in points.
Gets or sets the color used for text highlighting (background color behind the text).
public ColorBase HighlightColor
A ColorBase object that defines the background highlight color for the text.
Gets or sets the horizontal scaling of text as a percentage of normal width. Values above 100 stretch the text, while values below 100 compress it horizontally.
public double? HorizontalScaling
A nullable double value that specifies the horizontal scaling percentage.
Gets or sets the text rendering mode which controls how text is visually rendered. This affects whether text is filled, stroked, or used as a clipping path.
public RenderingMode RenderingMode
A RenderingMode enumeration value that determines how text is rendered.
Gets or sets the color of the strikethrough decoration.
public ColorBase StrikethroughColor
A ColorBase object that defines the color of the strikethrough decoration.
Gets or sets the strikethrough pattern applied to text. This determines the visual style of the strikethrough decoration.
public StrikethroughPattern StrikethroughPattern
A StrikethroughPattern enumeration value that defines the appearance of the strikethrough.
Gets or sets the color of the underline decoration.
public ColorBase UnderlineColor
A ColorBase object that defines the color of the underline decoration.
Gets or sets the underline pattern applied to text. This determines the visual style of the underline decoration.
public UnderlinePattern UnderlinePattern
An UnderlinePattern enumeration value that defines the appearance of the underline.
Gets or sets the additional spacing between words, measured in device-independent units. Positive values increase spacing, while negative values decrease spacing.
public double? WordSpacing
A nullable double value that specifies the additional space between words.
Methods
Copies the text properties from other instance.
public override void CopyFrom(TextProperties textProperties)
The text properties.
Overrides:
Tries to set the current font.
public bool TrySetFont(FontFamily fontFamily, FontStyle fontStyle, FontWeight fontWeight)
The font family.
fontStyleFontStyleThe font style.
fontWeightFontWeightThe font weight.
Returns:True if succeeded.
Tries to set the current font.
public bool TrySetFont(FontFamily fontFamily)
The font family.
Returns:True if succeeded.
Properties
Gets or sets the font used for rendering text. This defines the typeface, style, and other font characteristics used when displaying text.
public FontBase Font { get; set; }
A FontBase object that represents the font to be used for text rendering.
Exceptions:Thrown when attempting to set the font to null.