Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

RtfTableCell

OfficeIMO.Rtf

Namespace
OfficeIMO.Rtf
Assembly
OfficeIMO.Rtf
Source revision
ba882f6b0d07 with working tree changes
Implements
IRtfCloneable
Modifiers
sealed

RTF table cell.

Inheritance

  • object
  • RtfTableCell

Usage

Explore 10 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

public RtfTableCell() #

Methods

public RtfParagraph AddParagraph(string? text = null) #

Adds a paragraph to the cell.

Parameters

text string? = null optional
public RtfTable AddTable(int rows, int columns) #

Adds a nested table to the cell.

Parameters

rows int required
columns int required

Returns

RtfTable
public RtfTableCell SetBackgroundColor(int? colorIndex) #

Sets cell background shading to a one-based color table index.

Parameters

colorIndex int? required
public RtfTableCell SetFitText(bool fitText = true) #

Sets whether text is compressed to fit within the cell width.

Parameters

fitText bool = true optional
public RtfTableCell SetHideCellMark(bool hidden = true) #

Sets whether the end-of-cell mark is hidden.

Parameters

hidden bool = true optional
public RtfTableCell SetNoWrap(bool noWrap = true) #

Sets whether text should not wrap inside the cell.

Parameters

noWrap bool = true optional
public RtfTableCell SetPadding(int? topTwips = null, int? leftTwips = null, int? bottomTwips = null, int? rightTwips = null) #

Sets cell padding in twips.

Parameters

topTwips int? = null optional
leftTwips int? = null optional
bottomTwips int? = null optional
rightTwips int? = null optional
public RtfTableCell SetPreferredWidth(int? width, RtfTableWidthUnit? unit = null) #

Sets the preferred cell width.

Parameters

width int? required
unit OfficeIMO.Rtf.RtfTableWidthUnit? = null optional
public RtfTableCell SetShading(int? backgroundColorIndex, int? foregroundColorIndex = null, int? patternPercent = null, RtfShadingPattern pattern = None) #

Sets cell shading color and pattern metadata.

Parameters

backgroundColorIndex int? required
foregroundColorIndex int? = null optional
patternPercent int? = null optional
pattern OfficeIMO.Rtf.RtfShadingPattern = None optional
public RtfTableCell SetTextFlow(RtfTableCellTextFlow? textFlow) #

Sets the cell text flow.

Parameters

textFlow OfficeIMO.Rtf.RtfTableCellTextFlow? required

Properties

public IReadOnlyList<RtfParagraph> Paragraphs { get; } #

Paragraphs in the cell.

public IReadOnlyList<IRtfBlock> Blocks { get; } #

Ordered cell blocks, including paragraphs and nested tables.

public int? RightBoundaryTwips { get; set; } #

Right cell boundary in twips.

public RtfTableCellMerge HorizontalMerge { get; set; } #

Horizontal merge marker.

public RtfTableCellMerge VerticalMerge { get; set; } #

Vertical merge marker.

public int? BackgroundColorIndex { get; set; } #

One-based color table index used for cell background shading.

public int? ShadingForegroundColorIndex { get; set; } #

One-based color table index used for cell pattern foreground shading.

public int? ShadingPatternPercent { get; set; } #

Raw RTF \clshdng value, where 10000 represents 100 percent.

public RtfShadingPattern ShadingPattern { get; set; } #

Named RTF cell shading pattern.

public RtfTableCellVerticalAlignment? VerticalAlignment { get; set; } #

Vertical alignment for cell content.

public RtfTableCellTextFlow? TextFlow { get; set; } #

Text flow for cell content.

public int? PreferredWidth { get; set; } #

Preferred cell width value carried by \clwWidth.

public RtfTableWidthUnit? PreferredWidthUnit { get; set; } #

Preferred cell width unit carried by \clftsWidth.

public bool HideCellMark { get; set; } #

Whether the end-of-cell mark is hidden, represented by \clhidemark.

public bool NoWrap { get; set; } #

Whether text should not wrap inside the cell, represented by \clNoWrap.

public bool FitText { get; set; } #

Whether text is compressed to fit within the cell width, represented by \clFitText.

public int? PaddingTopTwips { get; set; } #

Top cell padding in twips.

public int? PaddingLeftTwips { get; set; } #

Left cell padding in twips.

public int? PaddingBottomTwips { get; set; } #

Bottom cell padding in twips.

public int? PaddingRightTwips { get; set; } #

Right cell padding in twips.

public RtfTableCellBorder TopBorder { get; private set; } #

Top cell border.

public RtfTableCellBorder LeftBorder { get; private set; } #

Left cell border.

public RtfTableCellBorder BottomBorder { get; private set; } #

Bottom cell border.

public RtfTableCellBorder RightBorder { get; private set; } #

Right cell border.

public RtfTableCellBorder TopLeftToBottomRightBorder { get; private set; } #

Diagonal cell border from top-left to bottom-right.

public RtfTableCellBorder TopRightToBottomLeftBorder { get; private set; } #

Diagonal cell border from top-right to bottom-left.