Class TextProperties
Represents a collection of text formatting properties that control the appearance of text in a document. This includes font settings, text decorations, colors, and alignment options.
Inherited Members
Namespace: Telerik.Windows.Documents.Fixed.Model.Editing
Assembly: Telerik.Windows.Documents.Fixed.dll
Syntax
public class TextProperties : PropertiesBase<TextProperties>
Constructors
TextProperties()
Fields
BaselineAlignment
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.
Declaration
public BaselineAlignment BaselineAlignment
Field Value
BaselineAlignment
A BaselineAlignment enumeration value that determines the vertical position of text relative to the baseline. |
CharacterSpacing
Gets or sets the spacing between characters, measured in device-independent units. Positive values increase spacing, while negative values decrease spacing.
Declaration
public double? CharacterSpacing
Field Value
System.Nullable<System.Double>
A nullable double value that specifies the additional space between characters. |
FontSize
Gets or sets the size of the font in points.
Declaration
public double FontSize
Field Value
System.Double
A double value representing the font size in points. |
HighlightColor
Gets or sets the color used for text highlighting (background color behind the text).
Declaration
public ColorBase HighlightColor
Field Value
ColorBase
A ColorBase object that defines the background highlight color for the text. |
HorizontalScaling
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.
Declaration
public double? HorizontalScaling
Field Value
System.Nullable<System.Double>
A nullable double value that specifies the horizontal scaling percentage. |
RenderingMode
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.
Declaration
public RenderingMode RenderingMode
Field Value
RenderingMode
A RenderingMode enumeration value that determines how text is rendered. |
StrikethroughColor
Gets or sets the color of the strikethrough decoration.
Declaration
public ColorBase StrikethroughColor
Field Value
ColorBase
A ColorBase object that defines the color of the strikethrough decoration. |
StrikethroughPattern
Gets or sets the strikethrough pattern applied to text. This determines the visual style of the strikethrough decoration.
Declaration
public StrikethroughPattern StrikethroughPattern
Field Value
StrikethroughPattern
A StrikethroughPattern enumeration value that defines the appearance of the strikethrough. |
UnderlineColor
Gets or sets the color of the underline decoration.
Declaration
public ColorBase UnderlineColor
Field Value
ColorBase
A ColorBase object that defines the color of the underline decoration. |
UnderlinePattern
Gets or sets the underline pattern applied to text. This determines the visual style of the underline decoration.
Declaration
public UnderlinePattern UnderlinePattern
Field Value
UnderlinePattern
An UnderlinePattern enumeration value that defines the appearance of the underline. |
WordSpacing
Gets or sets the additional spacing between words, measured in device-independent units. Positive values increase spacing, while negative values decrease spacing.
Declaration
public double? WordSpacing
Field Value
System.Nullable<System.Double>
A nullable double value that specifies the additional space between words. |
Properties
Font
Gets or sets the font used for rendering text. This defines the typeface, style, and other font characteristics used when displaying text.
Declaration
public FontBase Font { get; set; }
Property Value
FontBase
A FontBase object that represents the font to be used for text rendering. |
Exceptions
System.ArgumentNullException
Thrown when attempting to set the font to null. |
Methods
CopyFrom(TextProperties)
Copies the text properties from other instance.
Declaration
public override void CopyFrom(TextProperties textProperties)
Parameters
TextProperties
textProperties
The text properties. |
Overrides
TrySetFont(FontFamily)
Tries to set the current font.
Declaration
public bool TrySetFont(FontFamily fontFamily)
Parameters
System.Windows.Media.FontFamily
fontFamily
The font family. |
Returns
System.Boolean
True if succeeded. |
TrySetFont(FontFamily, FontStyle, FontWeight)
Tries to set the current font.
Declaration
public bool TrySetFont(FontFamily fontFamily, FontStyle fontStyle, FontWeight fontWeight)
Parameters
System.Windows.Media.FontFamily
fontFamily
The font family. |
System.Windows.FontStyle
fontStyle
The font style. |
System.Windows.FontWeight
fontWeight
The font weight. |
Returns
System.Boolean
True if succeeded. |