New to Telerik Document ProcessingStart a free 30-day trial

Defines the style, color, and thickness of a cell border edge.

Definition

Namespace:Telerik.Windows.Documents.Spreadsheet.Model

Assembly:Telerik.Windows.Documents.Spreadsheet.dll

Syntax:

C#
public class CellBorder

Inheritance: objectCellBorder

Constructors

Initializes a new CellBorder with the specified style and color.

C#
public CellBorder(CellBorderStyle style, ThemableColor color)
Parameters:styleCellBorderStyle

The style.

colorThemableColor

The color.

Fields

The default cell border.

C#
public static readonly CellBorder Default

Methods

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()

Calculates the line thickness for the specified border style.

C#
public static double GetThicknessByBorderStyle(CellBorderStyle borderStyle)
Parameters:borderStyleCellBorderStyle

The border style.

Returns:

double

The thickness.

Compares two borders and returns the one with higher visual priority based on thickness and color intensity.

C#
public static CellBorder GetWithMaxPriority(CellBorder leftBorder, CellBorder rightBorder, ThemeColorScheme colorScheme)
Parameters:leftBorderCellBorder

The left border.

rightBorderCellBorder

The right border.

colorSchemeThemeColorScheme

The color scheme.

Returns:

CellBorder

The border with higher priority according to the color scheme.

Operators

Implements the not equals operator.

C#
public static bool operator !=(CellBorder first, CellBorder second)
Parameters:firstCellBorder

The first value.

secondCellBorder

The second value.

Returns:

bool

The result of the operator.

Implements the equals operator.

C#
public static bool operator ==(CellBorder first, CellBorder second)
Parameters:firstCellBorder

The first value.

secondCellBorder

The second value.

Returns:

bool

The result of the operator.

Properties

Gets the color of this border, which may reference a theme color.

C#
public ThemableColor Color { get; }
Property Value:

The color.

Gets the line style of this border (solid, dashed, dotted, etc.).

C#
public CellBorderStyle Style { get; }
Property Value:

The style.

Gets the line thickness of this border in device-independent units, determined by the border style.

C#
public double Thickness { get; }
Property Value:

The thickness.