TextCharacterFormat Class
Represents a set of formatting properties that can be applied to a TextElement.
- Inheritance:
- System.ObjectTextCharacterFormat
Properties
Action
Gets or sets the action settings for this text that specify what should happen when the user clicks on this text or hovers over this text with a pointing device such as a computer mouse.
To remove all actions from this text, set this property to null.
Property Value
The action settings for this text that specify what should happen when the user clicks on this text or hovers over this text with a pointing device such as a computer mouse.
Remarks
Currently, not supported in PPT.
When setting a value, instance of a ActionSettings won't actually be stored in this text, but the data to which the instance points to will be copied. This enables easy copying of complex properties from one text to another.
Bold
Gets or sets a value indicating whether a run of text is formatted as bold text.
Default value is false.
Property Value
- System.Boolean
true if a run of text is formatted as bold text; otherwise, false.
Caps
Gets or sets the capitalization that is to be applied to the TextElement. This is a render-only modification and does not affect the actual characters stored in the TextRun.
Default value is None.
Property Value
The capitalization that is to be applied to the TextElement.
EqualizeCharacterHeight
Gets or sets the normalization of height that is to be applied to the TextElement. This is a render-only modification and does not affect the actual characters stored in the TextRun.
Default value is false.
This member is currently not supported in PDF, XPS, and image formats.
public bool EqualizeCharacterHeight { get; set; }
Public Property EqualizeCharacterHeight As Boolean
Property Value
- System.Boolean
true if character heights are equalized; otherwise, false.
Fill
Gets or sets the fill.
Property Value
The fill.
Font
Gets or sets the font to be used on characters within a given TextElement.
Property Value
- System.String
The font to be used on characters within a given TextElement.
Exceptions
- System.ArgumentException
Value is null or System.String.Empty.
HighlightColor
Gets or sets the highlight color.
Property Value
The highlight color.
Italic
Gets or sets a value indicating whether a run of text is formatted as italic text.
Default value is false.
Property Value
- System.Boolean
true if a run of text is formatted as italic text; otherwise, false.
Kerning
Gets or sets the minimum font size at which character kerning occurs for this TextElement.
This member is currently not supported in PDF, XPS, and image formats.
Property Value
The minimum font size at which character kerning occurs for this TextElement.
Exceptions
- System.ArgumentOutOfRangeException
Value is not between 0 and 4000 pt (inclusive).
Offset
Gets or sets the offset for both the superscript and subscript fonts. Positive value indicates superscript and negative value indicates subscript. The size is specified using a percentage where 0.01 is equal to 1 percent of the font size and 1 is equal to 100 percent font of the font size.
Default value is 0.
This member is currently partially supported in PDF, XPS, and image formats. All positive values are exported in the same superscript position and all negative values are exported in the same subscript position.
Property Value
- System.Double
The offset for both the superscript and subscript fonts.
Exceptions
- System.ArgumentOutOfRangeException
Value is not between -1 and 1 (inclusive).
Outline
Gets or sets the outline.
Property Value
The outline.
Size
Gets or sets the size of text within a TextElement.
Property Value
The size of text within a TextElement.
Exceptions
- System.ArgumentOutOfRangeException
Value is not between 1 pt and 4000 pt (inclusive).
Spacing
Gets or sets the spacing between characters within a TextRun. Positive value indicates expanded (loose) spacing and negative value indicates condensed (tight) spacing.
Default value is 0.
Property Value
Exceptions
- System.ArgumentOutOfRangeException
Value is not between -4000 pt and 4000 pt (inclusive).
Strikethrough
Gets or sets the text strikethrough.
Default value is None.
public StrikethroughType Strikethrough { get; set; }
Public Property Strikethrough As StrikethroughType
Property Value
The text strikethrough.
UnderlineFill
Gets or sets the underline fill.
Property Value
The underline fill.
UnderlineStyle
Gets or sets the text underline style.
Default value is None.
public UnderlineStyle UnderlineStyle { get; set; }
Public Property UnderlineStyle As UnderlineStyle
Property Value
The text underline style.