Value

PreferredWidth.Value property

Ottiene il valore di larghezza preferito. L’unità di misura è specificata nelType proprietà.

public double Value { get; }

Esempi

Mostra come verificare il tipo di larghezza e il valore preferiti di una cella di tabella.

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

Guarda anche