officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-tablecell-be070d14.md
Gets or sets the color of the cell background.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
Color BackgroundColor { get; set; }
Property BackgroundColor As Color
| Type | Description |
|---|---|
| Color |
A Color that is the color of the background.
|
Important
The semi-transparent alpha component (i.e. the Color’s alpha parameter set to value less than 255) is reset to opaque (255) during export to all formats except PDF.
The following code snippets (auto-collected from DevExpress Examples) contain references to the BackgroundColor property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
winforms-richedit-tables-simple-example/CS/TablesSimpleExample/Form1.cs#L184
table[i, j].Borders.Top.LineStyle = BorderLineStyle.None;
table[i, j].BackgroundColor = Color.Transparent;
}
word-document-api-table-examples/CS/Program.cs#L167
TableRow targetRow = table.Rows[2];
targetRow.Cells[0].BackgroundColor = Color.FromArgb(99, 122, 110);
targetRow.Cells[1].BackgroundColor = Color.FromArgb(99, 122, 110);
winforms-richedit-document-api/CS/RichEditAPISample/CodeExamples/Table.cs#L91
{
cell.BackgroundColor = System.Drawing.Color.Yellow;
}
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/TableActions.cs#L163
{
row[2].BackgroundColor = System.Drawing.Color.LightCyan;
row[2].VerticalAlignment = TableCellVerticalAlignment.Center;
word-document-api-examples/CS/CodeExamples/TablesActions.cs#L130
{
cell.BackgroundColor = Color.Yellow;
cell.Borders.Bottom.LineColor = Color.Red;
winforms-richedit-tables-simple-example/VB/TablesSimpleExample/Form1.vb#L151
table(i, j).Borders.Top.LineStyle = BorderLineStyle.None
table(i, j).BackgroundColor = Color.Transparent
Next
word-document-api-table-examples/VB/Program.vb#L134
Dim targetRow As TableRow = table.Rows(2)
targetRow.Cells(0).BackgroundColor = Color.FromArgb(99, 122, 110)
targetRow.Cells(1).BackgroundColor = Color.FromArgb(99, 122, 110)
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Table.vb#L80
Public Shared Sub ChangeCellColor(ByVal cell As DevExpress.XtraRichEdit.API.Native.TableCell, ByVal i As Integer, ByVal j As Integer)
cell.BackgroundColor = System.Drawing.Color.Yellow
End Sub
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/TableActions.vb#L145
Public Shared Sub ChangeColumnColor(ByVal row As TableRow, ByVal rowIndex As Integer)
row(2).BackgroundColor = System.Drawing.Color.LightCyan
row(2).VerticalAlignment = TableCellVerticalAlignment.Center
word-document-api-examples/VB/CodeExamples/TablesActions.vb#L120
Sub(cell As TableCell, i As Integer, j As Integer)
cell.BackgroundColor = Color.Yellow
cell.Borders.Bottom.LineColor = Color.Red
See Also