Type

PreferredWidth.Type property

Получает единицу измерения, используемую для этого предпочтительного значения ширины.

public PreferredWidthType Type { get; }

Примеры

Показывает, как проверить предпочтительный тип ширины и значение ячейки таблицы.

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);

Смотрите также