Skip to main content

XlBorder.AllBorders(XlColor) Method

Returns the XlBorder object that specifies all outside borders of a cell.

This method is equivalent to the XlBorder.OutlineBorders method and is reserved for future use.

Namespace: DevExpress.Export.Xl

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

NuGet Package: DevExpress.Printing.Core

Declaration

public static XlBorder AllBorders(
    XlColor color
)

Parameters

Name Type Description
color XlColor

An XlColor object that defines the line color of borders.

Returns

Type Description
XlBorder

An XlBorder class instance.

Remarks

Use the AllBorders method to specify top, bottom, left and right borders around a cell in one step. Note that this method specifies only the color of borders without setting their line style, so the border line style will be automatically set to XlBorderLineStyle.Thin.

If you need to set different formats for each border separately, use the corresponding *LineStyle and *Color properties of the XlBorder object.

To apply the specified border settings to a cell, pass the XlBorder object to the IXlCell.ApplyFormatting method as a parameter, or assign it to the IXlCell.Formatting property.

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

See Also