TableCellFormat Class
Represents a set of properties which shall be applied to a specific TableCell.
public sealed class TableCellFormat : Format
Public NotInheritable Class TableCellFormat
Inherits Format
- Inheritance:
- System.ObjectTableCellFormat
Constructors
TableCellFormat()
Initializes a new instance of the TableCellFormat class.
Properties
BackgroundColor
Gets or sets the table cell background color.
Property Value
The table cell background color.
Borders
Gets the table cell borders.
Property Value
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.
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.
Property Value
The table cell padding.
PreferredWidth
Gets or sets the preferred width of the TableCell.
Property Value
The preferred width of the TableCell.
TextDirection
Gets or sets the direction of the text flow for table cell.
public TableCellTextDirection TextDirection { get; set; }
Public Property TextDirection As TableCellTextDirection
Property Value
The direction of the text flow for table cell.
VerticalAlignment
Gets or sets the vertical alignment of the text in the TableCell.
public VerticalAlignment VerticalAlignment { get; set; }
Public Property VerticalAlignment As VerticalAlignment
Property Value
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).
Property Value
- System.Boolean
true if the table cell content shall be allowed to wrap; otherwise, false.
Methods
ClearFormatting()
Clears the formatting.
Overrides
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.
Returns
Cloned TableCellFormat.
Clone(Boolean)
Clones this TableCellFormat instance.
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
Cloned TableCellFormat.
Equals(Object)
Determines whether the specified System.Object is equal to this TableCellFormat instance.
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
GetHashCode()
Returns a hash code for this TableCellFormat instance.
Returns
- System.Int32
An integer value that specifies a hash value for this TableCellFormat instance.
Overrides
Operators
Equality(TableCellFormat, TableCellFormat)
Determines whether first
and second
TableCellFormats are equal.
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.
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) |