CellFormat
Overview
CellFormat is a class in Aspose.Words FOSS for .NET.
Inherits from: IBorderAttrSource, IShadingAttrSource.
Represents all formatting for a table cell.
This class provides 2 methods for working with CellFormat objects in .NET programs.
Available methods include: ClearFormatting, SetPaddings.
All public members are accessible to any .NET application after installing the Aspose.Words FOSS for .NET package.
Properties: Borders, BottomPadding, FitText, HideMark, HorizontalMerge, LeftPadding, and 9 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
LeftPadding | double | Read/Write | Returns or sets the amount of space (in points) to add to the left of the contents of cell. |
RightPadding | double | Read/Write | Returns or sets the amount of space (in points) to add to the right of the contents of cell. |
TopPadding | double | Read/Write | Returns or sets the amount of space (in points) to add above the contents of cell. |
BottomPadding | double | Read/Write | Returns or sets the amount of space (in points) to add below the contents of cell. |
Borders | BorderCollection | Read | Gets collection of borders of the cell. |
Shading | Shading | Read | Returns a Shading object that refers to the shading formatting for the cell. |
VerticalAlignment | CellVerticalAlignment | Read/Write | Returns or sets the vertical alignment of text in the cell. |
HideMark | bool | Read/Write | Returns or sets visibility of cell mark. |
Width | double | Read/Write | Gets the width of the cell in points. |
PreferredWidth | PreferredWidth | Read/Write | Returns or sets the preferred width of the cell. |
VerticalMerge | CellMerge | Read/Write | Specifies how the cell is merged with other cells vertically. |
HorizontalMerge | CellMerge | Read/Write | Specifies how the cell is merged horizontally with other cells in the row. |
Orientation | TextOrientation | Read/Write | Returns or sets the orientation of text in a table cell. |
FitText | bool | Read/Write | If true, fits text in the cell, compressing each paragraph to the width of the cell. |
WrapText | bool | Read/Write | If true, wrap text for the cell. |
Methods
| Signature | Description |
|---|---|
ClearFormatting() | Resets to default cell formatting. |
SetPaddings(leftPadding: double, topPadding: double, rightPadding: double, bottomPadding: double) | Sets the amount of space (in points) to add to the left/top/right/bottom of the contents of cell. |