[]
        
(Showing Draft Content)

GrapeCity.Documents.Word.CellFormat

Class CellFormat

Namespace
GrapeCity.Documents.Word
Assembly
GcDocs.Word.dll

Represents formatting for a table cell.

public class CellFormat : FormattingBag
Inheritance
object
CellFormat
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Properties

Borders

Gets the collection of borders of a cell.

public CellBorderCollection Borders { get; }

Property Value

CellBorderCollection

FitText

Gets or sets a value indicating whether to fit text in a cell, compressing each paragraph to the width of the cell.

public bool FitText { get; set; }

Property Value

bool

GridSpan

Gets or sets the number of grid columns in the parent table's table grid that shall be spanned by the current cell. This property allows cells to have the appearance of being merged, as they span vertical boundaries of other cells in the table.

public uint GridSpan { get; set; }

Property Value

uint

HorizontalMerge

Gets or sets a value specifying how a cell is merged horizontally with other cells in the row.

public CellMerge HorizontalMerge { get; set; }

Property Value

CellMerge

Remarks

This property is maintained for compatibility with legacy word documents that defined tables in this manner. Whenever possible, this form or horizontal merges should not be used, and should be translated to the appropriate GridSpan property instead.

Padding

Gets the cell paddings for a cell.

public CellPadding Padding { get; }

Property Value

CellPadding

PreferredWidth

Gets or sets the preferred width of a cell.

public PreferredWidth PreferredWidth { get; }

Property Value

PreferredWidth

Shading

Gets shading formatting for a cell.

public Shading Shading { get; }

Property Value

Shading

TableFormat

Gets the base table formatting properties for this cell.

protected TableFormatBase TableFormat { get; }

Property Value

TableFormatBase

TextFlowDirection

Gets or sets the orientation of text in a cell.

public TextFlowDirection TextFlowDirection { get; set; }

Property Value

TextFlowDirection

VerticalAlignment

Gets or sets the vertical alignment of text in a cell.

public CellVerticalAlignment VerticalAlignment { get; set; }

Property Value

CellVerticalAlignment

VerticalMerge

Gets or sets a value specifying how a cell is merged with other cells vertically.

public CellMerge VerticalMerge { get; set; }

Property Value

CellMerge

Remarks

Cells can only be merged vertically if their left and right boundaries are identical. When cells are vertically merged, the display areas of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell and all other vertically merged cells must be empty.

WordWrap

Gets or sets a value indicating whether to wrap text in a cell.

public bool WordWrap { get; set; }

Property Value

bool

Remarks

This property only affects the behavior of the cell when the AllowAutoFit for this table is set to true. This property shall be interpreted in the context of the PreferredWidth property as follows: If the table cell width is fixed, then this property specifies that that this table cell shall never be smaller than that fixed value when other cells on the line are not at their absolute minimum width. If the table cell width is relatuve or auto, then this property specifies that when running the auto fit algorithm, the contents of that this table cell shall be treated as though they have no breaking characters (the contents should be treated as a single contiguous non - breaking string).

Methods

ClearFormatting()

Resets to default cell formatting.

public override void ClearFormatting()