public void GetPreferredWidthTypeAndValue()
{
Document doc = new Document(MyDir + "Table.Document.doc");
// Find the first table in the document
Table table = (Table)doc.GetChild(NodeType.Table, 0, true);
//ExStart
//ExFor:PreferredWidthType
//ExFor:PreferredWidth.Type
//ExFor:PreferredWidth.Value
//ExId:GetPreferredWidthTypeAndValue
//ExSummary:Retrieves the preferred width type of a table cell.
Cell firstCell = table.FirstRow.FirstCell;
PreferredWidthType type = firstCell.CellFormat.PreferredWidth.Type;
double value = firstCell.CellFormat.PreferredWidth.Value;
//ExEnd
Assert.AreEqual(PreferredWidthType.Percent, type);
Assert.AreEqual(11.16, value);
}