TableCell.BackgroundColor
TableCell.BackgroundColor property
Ottiene o imposta il colore di sfondo.
public Color BackgroundColor { get; set; }
Esempi
Mostra come impostare un colore di sfondo per una cella.
// Crea un oggetto della classe Document
Document doc = new Document();
// Inizializza l'oggetto della classe TableCell e imposta il contenuto del testo
TableCell cell11 = new TableCell();
cell11.AppendChildLast(InsertTable.GetOutlineElementWithText(doc, "Small text"));
cell11.BackgroundColor = Color.Coral;
// Inizializza l'oggetto della classe TableRow
TableRow row = new TableRow();
row.AppendChildLast(cell11);
Table table = new Table()
{
IsBordersVisible = true,
Columns = { new TableColumn() { Width = 200 } }
};
table.AppendChildLast(row);
OutlineElement oe = new OutlineElement();
oe.AppendChildLast(table);
Outline o = new Outline();
o.AppendChildLast(oe);
// Inizializza l'oggetto della classe Page
Page page = new Page();
page.AppendChildLast(o);
doc.AppendChildLast(page);
doc.Save(Path.Combine(RunExamples.GetDataDir_Tables(), "SettingCellBackGroundColor.pdf"));
Guarda anche
- class TableCell
- spazio dei nomi Aspose.Note
- assemblea Aspose.Note