Value

PreferredWidth.Value property

Получает предпочтительное значение ширины. Единица измерения указана в п.Type свойство.

public double Value { 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);

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