XlBorder.DiagonalColor Property

Gets or sets the line color of the cell’s diagonal borders.

Namespace: DevExpress.Export.Xl

Assembly: DevExpress.Printing.v21.1.Core.dll

Declaration

public XlColor DiagonalColor { get; set; }

Property Value

Type Description
XlColor

A XlColor object that specifies the border line color.

Remarks

Use the DiagonalColor property to set or obtain the color of the upward and downward diagonal borders of a cell. The DiagonalColor property takes effect only when the line style of diagonal borders is specified. To do this, use the XlBordersBase.DiagonalLineStyle property. To display the upward or downward diagonal border using the specified settings, set the XlBordersBase.DiagonalUp or XlBordersBase.DiagonalDown property, respectively, to true.

You can also use the XlBordersBase.DiagonalUpLineStyle and XlBordersBase.DiagonalDownLineStyle properties to specify and display the cell’s diagonal borders. In this case, you should be aware that the line style of diagonal borders should be the same. So if you try to specify a different line style for the upward and downward diagonal borders, the last specified line style will be applied to both diagonal borders.

For more information on how to set cell borders, refer to the How to: Add Cell Borders example.

See Also