New to Telerik Document ProcessingStart a free 30-day trial

Defines the border styling for all edges of a cell or cell range, including outline, inside, and diagonal borders.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class CellBorders

Inheritance: objectCellBorders

Constructors

Initializes a new instance of the CellBorders class.

C#
public CellBorders()

Initializes a new CellBorders with individual borders for each edge and diagonal.

C#
public CellBorders(CellBorder left, CellBorder top, CellBorder right, CellBorder bottom, CellBorder insideHorizontal, CellBorder insideVertical, CellBorder diagonalUp, CellBorder diagonalDown)
Parameters:leftCellBorder

The left border.

topCellBorder

The top border.

rightCellBorder

The right border.

bottomCellBorder

The bottom border.

insideHorizontalCellBorder

The inside horizontal border.

insideVerticalCellBorder

The inside vertical border.

diagonalUpCellBorder

The diagonal up border.

diagonalDownCellBorder

The diagonal down border.

Initializes a new CellBorders applying the same border to all edges.

C#
public CellBorders(CellBorder all)
Parameters:allCellBorder

The cell border to be applied on all sides of the cell.

Fields

The default borders of a cell.

C#
public static readonly CellBorders Default

Methods

Creates a border configuration with separate borders for inside horizontal and vertical lines.

C#
public static CellBorders CreateInside(CellBorder insideHorizontal, CellBorder insideVertical)
Parameters:insideHorizontalCellBorder

The inside horizontal border.

insideVerticalCellBorder

The inside vertical border.

Returns:

CellBorders

The inside group of borders.

Creates a border configuration with the specified border applied to inside horizontal and vertical lines.

C#
public static CellBorders CreateInside(CellBorder all)
Parameters:allCellBorder

The border to be applied to the inner borders of a cell.

Returns:

CellBorders

The inside group of borders.

Creates a border configuration with individual borders applied to each outer edge.

C#
public static CellBorders CreateOutline(CellBorder left, CellBorder top, CellBorder right, CellBorder bottom)
Parameters:leftCellBorder

The left border.

topCellBorder

The top border.

rightCellBorder

The right border.

bottomCellBorder

The bottom border.

Returns:

CellBorders

The outline.

Creates a border configuration with the specified border applied to the outer edges only.

C#
public static CellBorders CreateOutline(CellBorder all)
Parameters:allCellBorder

The border to be applied to the top, right, bottom and left sides of the cell.

Returns:

CellBorders

The outline.

Determines whether the specified object is equal to the current object.

C#
public override bool Equals(object obj)
Parameters:objobject

The object to compare with the current object.

Returns:

bool

True if the specified object is equal to the current object; otherwise, false.

Overrides: object.Equals(object)

Serves as a hash function for a particular type.

C#
public override int GetHashCode()
Returns:

int

A hash code for the current object.

Overrides: object.GetHashCode()

Operators

Implements the not equals operator.

C#
public static bool operator !=(CellBorders first, CellBorders second)
Parameters:firstCellBorders

The first value.

secondCellBorders

The second value.

Returns:

bool

The result of the operator.

Implements the equals operator.

C#
public static bool operator ==(CellBorders first, CellBorders second)
Parameters:firstCellBorders

The first value.

secondCellBorders

The second value.

Returns:

bool

The result of the operator.

Properties

Gets or sets the border on the bottom edge of the cell.

C#
public CellBorder Bottom { get; set; }
Property Value:

The bottom border.

Gets or sets the border for the diagonal line from top-left to bottom-right.

C#
public CellBorder DiagonalDown { get; set; }
Property Value:

The diagonal down border.

Gets or sets the border for the diagonal line from bottom-left to top-right.

C#
public CellBorder DiagonalUp { get; set; }
Property Value:

The diagonal up border.

Gets or sets the border for horizontal lines inside a cell range.

C#
public CellBorder InsideHorizontal { get; set; }
Property Value:

The inside horizontal border.

Gets or sets the border for vertical lines inside a cell range.

C#
public CellBorder InsideVertical { get; set; }
Property Value:

The inside vertical border.

Gets or sets the border on the left edge of the cell.

C#
public CellBorder Left { get; set; }
Property Value:

The left border.

Gets or sets the border on the right edge of the cell.

C#
public CellBorder Right { get; set; }
Property Value:

The right border.

Gets or sets the border on the top edge of the cell.

C#
public CellBorder Top { get; set; }
Property Value:

The top border.