ContextTableFormatting
Contenido
[
Ocultar
]DocumentBuilderOptions.ContextTableFormatting property
Verdadero si el formato aplicado al contenido de la tabla no afecta el formato del contenido que le sigue. El valor predeterminado esverdadero
.
public bool ContextTableFormatting { get; set; }
Ejemplos
Muestra cómo ignorar el formato de tabla para el contenido posterior.
Document doc = new Document();
DocumentBuilderOptions builderOptions = new DocumentBuilderOptions();
builderOptions.ContextTableFormatting = true;
DocumentBuilder builder = new DocumentBuilder(doc, builderOptions);
// Agrega contenido antes de la tabla.
// El tamaño de fuente predeterminado es 12.
builder.Writeln("Font size 12 here.");
builder.StartTable();
builder.InsertCell();
// Cambia el tamaño de fuente dentro de la tabla.
builder.Font.Size = 5;
builder.Write("Font size 5 here");
builder.InsertCell();
builder.Write("Font size 5 here");
builder.EndRow();
builder.EndTable();
// Si ContextTableFormatting es verdadero, entonces el formato de tabla no se aplica al contenido posterior.
// Si ContextTableFormatting es falso, entonces el formato de tabla se aplica al contenido después.
builder.Writeln("Font size 12 here.");
doc.Save(ArtifactsDir + "Table.ContextTableFormatting.docx");
Ver también
- class DocumentBuilderOptions
- espacio de nombres Aspose.Words
- asamblea Aspose.Words