Type

PreferredWidth.Type property

Gets the unit of measure used for this preferred width value.

public PreferredWidthType Type { get; }

Examples

Shows how to verify the preferred width type and value of a table cell.

Document doc = new Document(MyDir + "Tables.docx");

Table table = doc.FirstSection.Body.Tables[0];
Cell firstCell = table.FirstRow.FirstCell;

Assert.AreEqual(PreferredWidthType.Percent, firstCell.CellFormat.PreferredWidth.Type);
Assert.AreEqual(11.16d, firstCell.CellFormat.PreferredWidth.Value);

See Also