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

    Show / Hide Table of Contents

    TextFormat Class

    Namespace:
    GemBox.Spreadsheet.Drawing
    Assembly:
    GemBox.Spreadsheet.dll

    Represents a group of text formatting options.

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

    Properties

    Bold

    Gets or sets a value indicating whether the text is formatted as bold.

    Default value is false.

    • C#
    • VB.NET
    public bool Bold { get; set; }
    Public Property Bold As Boolean
    Property Value
    System.Boolean

    true if the text is formatted as bold; otherwise, false.

    Caps

    Gets or sets the capitalization that is to be applied to the text. This is a render-only modification and does not affect the actual characters stored in the text.

    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 text.

    EqualizeCharacterHeight

    Gets or sets the normalization of height that is to be applied to the text. This is a render-only modification and does not affect the actual characters stored in the text.

    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 the text.

    • 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 the text.

    Exceptions
    System.ArgumentException

    Value is null or System.String.Empty.

    Italic

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

    Default value is false.

    • C#
    • VB.NET
    public bool Italic { get; set; }
    Public Property Italic As Boolean
    Property Value
    System.Boolean

    true if the text is formatted as italic; otherwise, false.

    Kerning

    Gets or sets the minimum font size at which character kerning occurs.

    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.

    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 text size.

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

    The text size.

    Exceptions
    System.ArgumentOutOfRangeException

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

    Spacing

    Gets or sets the spacing between characters within the text. Positive value indicates expanded (loose) spacing and negative value indicates condensed (tight) spacing.

    Default value is 0.

    This member is currently not supported in PDF, XPS, and image formats.

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

    The spacing between characters within the text.

    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 DrawingUnderlineStyle UnderlineStyle { get; set; }
    Public Property UnderlineStyle As DrawingUnderlineStyle
    Property Value
    DrawingUnderlineStyle

    The text underline style.

    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.