PreferredWidth
Table.PreferredWidth property
Obtiene o establece el ancho preferido de la tabla.
public PreferredWidth PreferredWidth { get; set; }
Observaciones
El valor predeterminado esAuto
.
Ejemplos
Muestra cómo configurar una tabla para que se ajuste automáticamente al 50% del ancho de la página.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Table table = builder.StartTable();
builder.InsertCell();
builder.Write("Cell #1");
builder.InsertCell();
builder.Write("Cell #2");
builder.InsertCell();
builder.Write("Cell #3");
table.PreferredWidth = PreferredWidth.FromPercent(50);
doc.Save(ArtifactsDir + "DocumentBuilder.InsertTableWithPreferredWidth.docx");
Ver también
- class PreferredWidth
- class Table
- espacio de nombres Aspose.Words.Tables
- asamblea Aspose.Words