Border Class

Encapsulates the object that represents the cell border.
Inheritance Hierarchy
SystemObject
  Aspose.CellsBorder

Namespace:  Aspose.Cells
Assembly:  Aspose.Cells (in Aspose.Cells.dll) Version: 20.11.0.0 (20.11)
Syntax
[SerializableAttribute]
public class Border

The Border type exposes the following members.

Properties
  NameDescription
Public propertyArgbColor
Gets and sets the color with a 32-bit ARGB value.
Public propertyColor
Gets or sets the Color of the border.
Public propertyLineStyle
Gets or sets the cell border type.
Public propertyThemeColor
Gets and sets the theme color of the border.
Methods
  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Protected methodMemberwiseClone (Inherited from Object.)
Public methodToString (Inherited from Object.)
Examples
[C#]

Style style = cell.GetStyle();
//Set top border style and color
Border border = style.Borders[BorderType.TopBorder];
border.LineStyle = CellBorderType.Medium;
border.Color = Color.Red;
cell.SetStyle(style);

[Visual Basic]

Dim style as Style = cell.GetStyle()
'Set top border style and color
Dim border as Border = style.Borders(BorderType.TopBorder)
border.LineStyle = CellBorderType.Medium
border.Color = Color.Red
cell.SetStyle(style);
See Also