[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IBorders.Item

this Property

this[BordersIndex]

Gets a specific IBorder object from the collection by using a BordersIndex value.

Use this indexer to access an edge border, inside border, or diagonal border.

Declaration
IBorder this[BordersIndex index] { get; }
ReadOnly Default Property Item(index As BordersIndex) As IBorder
Parameters
Type Name Description
BordersIndex index

The BordersIndex value that identifies the border.

Examples
IBorders borders = worksheet.Range["B2:E6"].Borders;

IBorder topBorder = borders[BordersIndex.EdgeTop];
topBorder.LineStyle = BorderLineStyle.Thick;
topBorder.Color = Color.Red;

IBorder diagonalDown = borders[BordersIndex.DiagonalDown];
diagonalDown.LineStyle = BorderLineStyle.Thin;