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.That(firstCell.CellFormat.PreferredWidth.Type, Is.EqualTo(PreferredWidthType.Percent));
Assert.That(firstCell.CellFormat.PreferredWidth.Value, Is.EqualTo(11.16d));

See Also