The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

Table.TableLook Property

Gets or sets the table style options that modify the table appearance.

Namespace: DevExpress.XtraRichEdit.API.Native

Assembly: DevExpress.RichEdit.v19.2.Core.dll

Declaration

TableLookTypes TableLook { get; set; }
Property TableLook As TableLookTypes
TableLookTypes TableLook { get; set; }
Property TableLook As TableLookTypes
TableLookTypes TableLook { get; set; }
Property TableLook As TableLookTypes

Property Value

Type Description
TableLookTypes

The TableLookTypes enumeration values which specify table style options that change the table appearance.

Property Value

Type Description
TableLookTypes

The TableLookTypes enumeration values which specify table style options that change the table appearance.

Property Value

Type Description
TableLookTypes

The TableLookTypes enumeration values which specify table style options that change the table appearance.

Remarks

Use the TableLook property to apply row or column banding formatting to the table, or special formatting to the first row, last row, first column or last column.

RichEditControl_Table_TableLook

Examples

Document document = server.Document;
document.LoadDocument("Documents\\TableStyles.docx", DocumentFormat.OpenXml);
document.BeginUpdate();

// Create a new style that is based on the 'Grid Table 5 Dark Accent 1' style defined in the loaded document.
TableStyle myNewStyle = document.TableStyles.CreateNew();
myNewStyle.Parent = document.TableStyles["Grid Table 5 Dark Accent 1"];
// Create conditional styles (styles for table elements)
TableConditionalStyle myNewStyleForFirstRow =
    myNewStyle.ConditionalStyleProperties.CreateConditionalStyle(ConditionalTableStyleFormattingTypes.FirstRow);
myNewStyleForFirstRow.CellBackgroundColor = Color.PaleVioletRed;
TableConditionalStyle myNewStyleForFirstColumn =
    myNewStyle.ConditionalStyleProperties.CreateConditionalStyle(ConditionalTableStyleFormattingTypes.FirstColumn);
myNewStyleForFirstColumn.CellBackgroundColor = Color.PaleVioletRed;
TableConditionalStyle myNewStyleForOddColumns =
    myNewStyle.ConditionalStyleProperties.CreateConditionalStyle(ConditionalTableStyleFormattingTypes.OddColumnBanding);
myNewStyleForOddColumns.CellBackgroundColor = System.Windows.Forms.ControlPaint.Light(Color.PaleVioletRed);
TableConditionalStyle myNewStyleForEvenColumns =
    myNewStyle.ConditionalStyleProperties.CreateConditionalStyle(ConditionalTableStyleFormattingTypes.EvenColumnBanding);
myNewStyleForEvenColumns.CellBackgroundColor = System.Windows.Forms.ControlPaint.LightLight(Color.PaleVioletRed);
document.TableStyles.Add(myNewStyle);
// Create a new table and apply a new style.
Table table = document.Tables.Create(document.Range.End, 4, 4, AutoFitBehaviorType.AutoFitToWindow);
table.Style = myNewStyle;
// Specify which conditonal styles are in effect.
table.TableLook = TableLookTypes.ApplyFirstRow | TableLookTypes.ApplyFirstColumn;

document.EndUpdate();
See Also