GemBox.Presentation
  • Overview
  • Examples
  • Free version
  • Support
  • Pricelist

    Show / Hide Table of Contents

    TextCharacterFormat Class

    Namespace:
    GemBox.Presentation
    Assembly:
    GemBox.Presentation.dll

    Represents a set of formatting properties that can be applied to a TextElement.

    • C#
    • VB.NET
    public sealed class TextCharacterFormat
    Public NotInheritable Class TextCharacterFormat
    Inheritance:
    System.Object
    TextCharacterFormat

    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.

    • C#
    • VB.NET
    public ActionSettings Action { get; set; }
    Public Property Action As ActionSettings
    Property Value
    ActionSettings

    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.

    • C#
    • VB.NET
    public bool Bold { get; set; }
    Public Property Bold As Boolean
    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.

    • C#
    • VB.NET
    public CapsType Caps { get; set; }
    Public Property Caps As CapsType
    Property Value
    CapsType

    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.

    • C#
    • VB.NET
    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.

    • C#
    • VB.NET
    public FillFormat Fill { get; set; }
    Public Property Fill As FillFormat
    Property Value
    FillFormat

    The fill.

    Font

    Gets or sets the font to be used on characters within a given TextElement.

    • C#
    • VB.NET
    public string Font { get; set; }
    Public Property Font As String
    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.

    • C#
    • VB.NET
    public Color HighlightColor { get; set; }
    Public Property HighlightColor As Color
    Property Value
    Color

    The highlight color.

    Italic

    Gets or sets a value indicating whether a run of text is formatted as italic text.

    Default value is false.

    • C#
    • VB.NET
    public bool Italic { get; set; }
    Public Property Italic As Boolean
    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.

    • C#
    • VB.NET
    public Length Kerning { get; set; }
    Public Property Kerning As Length
    Property Value
    Length

    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.

    • C#
    • VB.NET
    public double Offset { get; set; }
    Public Property Offset As Double
    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.

    • C#
    • VB.NET
    public LineFormat Outline { get; set; }
    Public Property Outline As LineFormat
    Property Value
    LineFormat

    The outline.

    Size

    Gets or sets the size of text within a TextElement.

    • C#
    • VB.NET
    public Length Size { get; set; }
    Public Property Size As Length
    Property Value
    Length

    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.

    • C#
    • VB.NET
    public Length Spacing { get; set; }
    Public Property Spacing As Length
    Property Value
    Length

    The spacing between characters within a TextRun.

    Exceptions
    System.ArgumentOutOfRangeException

    Value is not between -4000 pt and 4000 pt (inclusive).

    Strikethrough

    Gets or sets the text strikethrough.

    Default value is None.

    • C#
    • VB.NET
    public StrikethroughType Strikethrough { get; set; }
    Public Property Strikethrough As StrikethroughType
    Property Value
    StrikethroughType

    The text strikethrough.

    UnderlineFill

    Gets or sets the underline fill.

    • C#
    • VB.NET
    public FillFormat UnderlineFill { get; set; }
    Public Property UnderlineFill As FillFormat
    Property Value
    FillFormat

    The underline fill.

    UnderlineStyle

    Gets or sets the text underline style.

    Default value is None.

    • C#
    • VB.NET
    public UnderlineStyle UnderlineStyle { get; set; }
    Public Property UnderlineStyle As UnderlineStyle
    Property Value
    UnderlineStyle

    The text underline style.

    Examples

    Character Formatting Example
    Hyperlinks Example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.