Class
CellBorder

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:

cs-api-definition
public class CellBorder

Inheritance: objectCellBorder

Constructors

CellBorder(CellBorderStyle, ThemableColor)

Initializes a new CellBorder with the specified style and color.

Declaration

cs-api-definition
public CellBorder(CellBorderStyle style, ThemableColor color)

Parameters

style

CellBorderStyle

The style.

color

ThemableColor

The color.

Fields

Default

The default cell border.

Declaration

cs-api-definition
public static readonly CellBorder Default

Field Value

CellBorder

Properties

Color

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

Declaration

cs-api-definition
public ThemableColor Color { get; }

Property Value

ThemableColor

The color.

Style

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

Declaration

cs-api-definition
public CellBorderStyle Style { get; }

Property Value

CellBorderStyle

The style.

Thickness

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

Declaration

cs-api-definition
public double Thickness { get; }

Property Value

double

The thickness.

Methods

Equals(object)

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

Declaration

cs-api-definition
public override bool Equals(object obj)

Parameters

obj

object

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)

GetHashCode()

Serves as a hash function for a particular type.

Declaration

cs-api-definition
public override int GetHashCode()

Returns

int

A hash code for the current object.

Overrides object.GetHashCode()

GetThicknessByBorderStyle(CellBorderStyle)

Calculates the line thickness for the specified border style.

Declaration

cs-api-definition
public static double GetThicknessByBorderStyle(CellBorderStyle borderStyle)

Parameters

borderStyle

CellBorderStyle

The border style.

Returns

double

The thickness.

GetWithMaxPriority(CellBorder, CellBorder, ThemeColorScheme)

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

Declaration

cs-api-definition
public static CellBorder GetWithMaxPriority(CellBorder leftBorder, CellBorder rightBorder, ThemeColorScheme colorScheme)

Parameters

leftBorder

CellBorder

The left border.

rightBorder

CellBorder

The right border.

colorScheme

ThemeColorScheme

The color scheme.

Returns

CellBorder

The border with higher priority according to the color scheme.

Operators

operator !=(CellBorder, CellBorder)

Implements the not equals operator.

Declaration

cs-api-definition
public static bool operator !=(CellBorder first, CellBorder second)

Parameters

first

CellBorder

The first value.

second

CellBorder

The second value.

Returns

bool

The result of the operator.

operator ==(CellBorder, CellBorder)

Implements the equals operator.

Declaration

cs-api-definition
public static bool operator ==(CellBorder first, CellBorder second)

Parameters

first

CellBorder

The first value.

second

CellBorder

The second value.

Returns

bool

The result of the operator.