PreferredWidthType Enumeration

Specifies the unit of measurement for the preferred width of a table or cell.

Namespace:  Aspose.Words.Tables
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.7.0


public enum PreferredWidthType


  Member nameValueDescription
Auto1 The preferred width is not specified. The actual width of the table or cell is either specified using the explicit width or will be determined automatically by the table layout algorithm when the table is displayed, depending on the table auto fit setting.
Percent2 Measure the current item width using a specified percentage.
Points3 Measure the current item width using a specified number of points (1/72 inch).


Shows how to verify the preferred width type of a table cell.
Document doc = new Document(MyDir + "Tables.docx");

// Find the first table in the document
Table table = (Table)doc.GetChild(NodeType.Table, 0, true);
Cell firstCell = table.FirstRow.FirstCell;

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

See Also