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

    Show / Hide Table of Contents

    TableCellFormat Class

    Namespace:
    GemBox.Document.Tables
    Assembly:
    GemBox.Document.dll

    Represents a set of properties which shall be applied to a specific TableCell.

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

    Constructors

    TableCellFormat()

    Initializes a new instance of the TableCellFormat class.

    • C#
    • VB.NET
    public TableCellFormat()
    Public Sub New

    Properties

    BackgroundColor

    Gets or sets the table cell background color.

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

    The table cell background color.

    Borders

    Gets the table cell borders.

    • C#
    • VB.NET
    public MultipleBorders Borders { get; }
    Public ReadOnly Property Borders As MultipleBorders
    Property Value
    MultipleBorders

    The table cell borders.

    FitText

    Gets or sets a value indicating whether the content of the table cell shall have its inter-character spacing increased or reduced as necessary to fit the width of the text extents of the table cell.

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

    true if the content of the table cell shall have its inter-character spacing increased or reduced as necessary to fit the width of the text extents of the table cell; otherwise, false.

    Remarks

    This feature is currently implemented differently when exporting a document to PDF, XPS, or image formats than in MS Word application. It is implemented by scaling table cell's content so it fits the size of the text extents of the table cell, and not by increasing or reducing inter-character spacing.

    Padding

    Gets or sets the table cell padding.

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

    The table cell padding.

    PreferredWidth

    Gets or sets the preferred width of the TableCell.

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

    The preferred width of the TableCell.

    TextDirection

    Gets or sets the direction of the text flow for table cell.

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

    The direction of the text flow for table cell.

    VerticalAlignment

    Gets or sets the vertical alignment of the text in the TableCell.

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

    The vertical alignment of the text in the TableCell.

    WrapText

    Gets or sets a value indicating whether the table cell content shall be allowed to wrap (the cell may be shrunk as needed if it is a fixed preferred width value, and the content shall be treated as having breaking characters if it is a percentage or automatic width value).

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

    true if the table cell content shall be allowed to wrap; otherwise, false.

    Methods

    ClearFormatting()

    Clears the formatting.

    • C#
    • VB.NET
    public override void ClearFormatting()
    Public Overrides Sub ClearFormatting
    Overrides
    Format.ClearFormatting()
    Remarks

    This method will clear all directly set formatting values. When retrieving formatting value, they can still come from other sources, as explained in formats and styles article.

    Clone()

    Clones this TableCellFormat instance.

    • C#
    • VB.NET
    public TableCellFormat Clone()
    Public Function Clone As TableCellFormat
    Returns
    TableCellFormat

    Cloned TableCellFormat.

    Clone(Boolean)

    Clones this TableCellFormat instance.

    • C#
    • VB.NET
    public TableCellFormat Clone(bool resolveValues)
    Public Function Clone(resolveValues As Boolean) As TableCellFormat
    Parameters
    resolveValues
    System.Boolean

    If true, the values to be cloned will be fetched from this object's resolved values. This means that even if a property was never explicitly set, this method will look into this format style or in the document's default formats to resolve the values and explicitly set them in the cloned object.

    Returns
    TableCellFormat

    Cloned TableCellFormat.

    Equals(Object)

    Determines whether the specified System.Object is equal to this TableCellFormat instance.

    • C#
    • VB.NET
    public override bool Equals(object obj)
    Public Overrides Function Equals(obj As Object) As Boolean
    Parameters
    obj
    System.Object

    The System.Object to compare with this table cell format instance.

    Returns
    System.Boolean

    true if the specified System.Object is a TableCellFormat and is equal to this TableCellFormat instance; otherwise, false.

    Overrides
    System.Object.Equals(System.Object)

    GetHashCode()

    Returns a hash code for this TableCellFormat instance.

    • C#
    • VB.NET
    public override int GetHashCode()
    Public Overrides Function GetHashCode As Integer
    Returns
    System.Int32

    An integer value that specifies a hash value for this TableCellFormat instance.

    Overrides
    System.Object.GetHashCode()

    Operators

    Equality(TableCellFormat, TableCellFormat)

    Determines whether first and second TableCellFormats are equal.

    • C#
    • VB.NET
    public static bool operator ==(TableCellFormat first, TableCellFormat second)
    Public Shared Operator =(first As TableCellFormat, second As TableCellFormat) As Boolean
    Parameters
    first
    TableCellFormat

    The first table cell format.

    second
    TableCellFormat

    The second table cell format.

    Returns
    System.Boolean

    true if first and second table cell formats are equal; otherwise, false.

    Inequality(TableCellFormat, TableCellFormat)

    Determines whether first and second TableCellFormats are not equal.

    • C#
    • VB.NET
    public static bool operator !=(TableCellFormat first, TableCellFormat second)
    Public Shared Operator <>(first As TableCellFormat, second As TableCellFormat) As Boolean
    Parameters
    first
    TableCellFormat

    The first table cell format.

    second
    TableCellFormat

    The second table cell format.

    Returns
    System.Boolean

    true if first and second table cell formats are not equal; otherwise, false.

    Inherited Properties

    Document

    Gets the owner document.

    (Inherited from Format)

    Examples

    Table Formatting example
    Back to top

    Facebook • Twitter • LinkedIn

    © GemBox Ltd. — All rights reserved.