officefileapi-devexpress-dot-xtrarichedit-dot-api-dot-native-dot-tablecellpropertiesbase.md
Gets or sets the TableCell.BackgroundColor property for the specified cells.
Namespace : DevExpress.XtraRichEdit.API.Native
Assembly : DevExpress.RichEdit.v25.2.Core.dll
NuGet Package : DevExpress.RichEdit.Core
Color? CellBackgroundColor { get; set; }
Property CellBackgroundColor As Color?
| Type | Description |
|---|---|
| Nullable<Color> |
A Color value or null if the color is not set or is not the same for the specified cells.
|
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 CellBackgroundColor 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-document-api/CS/RichEditAPISample/CodeExamples/Table.cs#L124
tStyleMain.TableBorders.Right.LineStyle = BorderLineStyle.Double;
tStyleMain.CellBackgroundColor = System.Drawing.Color.LightBlue;
tStyleMain.TableLayout = TableLayoutType.Fixed;
wpf-richedit-document-api/CS/DXRichEditControlAPISample/CodeExamples/TableActions.cs#L92
tStyleMain.TableBorders.Right.LineStyle = BorderLineStyle.Double;
tStyleMain.CellBackgroundColor = System.Drawing.Color.LightBlue;
tStyleMain.TableLayout = TableLayoutType.Fixed;
winforms-richedit-tables-simple-example/CS/TablesSimpleExample/Form1.cs#L210
insideVerticalBorder.LineColor = Color.White;
tStyleMain.CellBackgroundColor = Color.FromArgb(227, 238, 220);
tStyleMain.Name = "MyTableStyle";
word-document-api-table-examples/CS/Program.cs#L196
tStyleMain.TableBorders.InsideVerticalBorder.LineColor = Color.White;
tStyleMain.CellBackgroundColor = Color.FromArgb(227, 238, 220);
tStyleMain.Name = "MyTableStyle";
winforms-richedit-document-api/VB/RichEditAPISample/CodeExamples/Table.vb#L112
tStyleMain.TableBorders.Right.LineStyle = DevExpress.XtraRichEdit.API.Native.BorderLineStyle.[Double]
tStyleMain.CellBackgroundColor = System.Drawing.Color.LightBlue
tStyleMain.TableLayout = DevExpress.XtraRichEdit.API.Native.TableLayoutType.Fixed
wpf-richedit-document-api/VB/DXRichEditControlAPISample/CodeExamples/TableActions.vb#L82
tStyleMain.TableBorders.Right.LineStyle = BorderLineStyle.Double
tStyleMain.CellBackgroundColor = System.Drawing.Color.LightBlue
tStyleMain.TableLayout = TableLayoutType.Fixed
word-document-api-examples/VB/CodeExamples/TablesActions.vb#L198
Dim myNewStyleForFirstRow As DevExpress.XtraRichEdit.API.Native.TableConditionalStyle = myNewStyle.ConditionalStyleProperties.CreateConditionalStyle(DevExpress.XtraRichEdit.API.Native.ConditionalTableStyleFormattingTypes.FirstRow)
myNewStyleForFirstRow.CellBackgroundColor = System.Drawing.Color.PaleVioletRed
Dim myNewStyleForFirstColumn As DevExpress.XtraRichEdit.API.Native.TableConditionalStyle = myNewStyle.ConditionalStyleProperties.CreateConditionalStyle(DevExpress.XtraRichEdit.API.Native.ConditionalTableStyleFormattingTypes.FirstColumn)
winforms-richedit-tables-simple-example/VB/TablesSimpleExample/Form1.vb#L173
insideVerticalBorder.LineColor = Color.White
tStyleMain.CellBackgroundColor = Color.FromArgb(227, 238, 220)
tStyleMain.Name = "MyTableStyle"
word-document-api-table-examples/VB/Program.vb#L158
tStyleMain.TableBorders.InsideVerticalBorder.LineColor = Color.White
tStyleMain.CellBackgroundColor = Color.FromArgb(227, 238, 220)
tStyleMain.Name = "MyTableStyle"
See Also
TableCellPropertiesBase Interface