• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class AbstractBorders

Provides a base class for border collections managing all four cell edges.

Inheritance
object
AbstractBorders
Borders
FormattableBorders
FormattingCellBorders
Inherited Members
object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public abstract class AbstractBorders
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Constructors

AbstractBorders()

Initializes a new AbstractBorders for the supplied workbook data.

Declaration
protected AbstractBorders()
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

AbstractBorders(AbstractBorders)

Initializes a new AbstractBorders for the supplied workbook data.

Declaration
protected AbstractBorders(AbstractBorders borders)
Parameters
Type Name Description
AbstractBorders borders
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Properties

Bottom

Specifies the bottom border.

Declaration
public abstract Border Bottom { get; set; }
Property Value
Type Description
Border
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Diagonal

Specifies the diagonal border (appears from top-left to bottom-right).

Declaration
public abstract Border Diagonal { get; set; }
Property Value
Type Description
Border
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

DiagonalDown

Gets or sets whether the diagonal border runs from bottom-left to top-right.

Declaration
public virtual bool DiagonalDown { get; set; }
Property Value
Type Description
bool
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

DiagonalUp

Gets or sets whether the diagonal border runs from top-left to bottom-right.

Declaration
public virtual bool DiagonalUp { get; set; }
Property Value
Type Description
bool
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Horizontal

Specifies the horizontal border (between cells in the same column).

Declaration
public abstract Border Horizontal { get; set; }
Property Value
Type Description
Border
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Left

Specifies the left border.

Declaration
public abstract Border Left { get; set; }
Property Value
Type Description
Border
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Outline

Gets or sets whether this is an outline border.

Declaration
public bool Outline { get; set; }
Property Value
Type Description
bool
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Right

Specifies the right border.

Declaration
public abstract Border Right { get; set; }
Property Value
Type Description
Border
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Top

Specifies the top border.

Declaration
public abstract Border Top { get; set; }
Property Value
Type Description
Border
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Vertical

Specifies the vertical border (between cells in the same row).

Declaration
public abstract Border Vertical { get; set; }
Property Value
Type Description
Border
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Methods

Equals(object)

Exposes the equals associated with AbstractBorders.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
object obj

The obj used by the operation.

Returns
Type Description
bool

The equals returned by the operation.

Overrides
object.Equals(object)
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

From(AbstractBorders)

Converts the supplied data for use with the AbstractBorders.

Declaration
public void From(AbstractBorders other)
Parameters
Type Name Description
AbstractBorders other

The other used by the operation.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

GetHashCode()

Retrieves the requested hash code from the AbstractBorders.

Declaration
public override int GetHashCode()
Returns
Type Description
int

The get hash code returned by the operation.

Overrides
object.GetHashCode()
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

IsDefault()

Determines whether all borders are at their default values.

Declaration
public bool IsDefault()
Returns
Type Description
bool

True if all borders are default; otherwise, false.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Set(BorderType, BorderStyle)

Sets the specified border edges to the given style with no explicit color.

Declaration
public void Set(BorderType edges, BorderStyle borderStyle)
Parameters
Type Name Description
BorderType edges
BorderStyle borderStyle
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Set(BorderType, BorderStyle, SpreadsheetColor)

Sets the specified border edges to the given style and color. Use BorderType flags to select which edges to set.

Declaration
public void Set(BorderType edges, BorderStyle borderStyle, SpreadsheetColor color)
Parameters
Type Name Description
BorderType edges

A bitwise combination of BorderType values indicating which edges to set.

BorderStyle borderStyle

The border style to apply.

SpreadsheetColor color

The spreadsheet color.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetAll(BorderStyle)

Sets all four edges (left, top, right, bottom) to the same style with no explicit color. Equivalent to "All Borders" in the Excel UI.

Declaration
public void SetAll(BorderStyle borderStyle)
Parameters
Type Name Description
BorderStyle borderStyle
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetAll(BorderStyle, SpreadsheetColor)

Sets all four edges (left, top, right, bottom) to the same style and color. Equivalent to "All Borders" in the Excel UI.

Declaration
public void SetAll(BorderStyle borderStyle, SpreadsheetColor color)
Parameters
Type Name Description
BorderStyle borderStyle
SpreadsheetColor color
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetBoxBorder(BorderStyle)

Sets all four box borders (top, bottom, left, right) to the same style.

Declaration
public virtual void SetBoxBorder(BorderStyle borderStyle)
Parameters
Type Name Description
BorderStyle borderStyle

The border style to apply.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetBoxBorder(BorderStyle, SpreadsheetColor)

Sets all four box borders with a specific spreadsheet color.

Declaration
public void SetBoxBorder(BorderStyle borderStyle, SpreadsheetColor color)
Parameters
Type Name Description
BorderStyle borderStyle

The border style to apply.

SpreadsheetColor color

The spreadsheet color.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetBoxBorder(BorderStyle, Color)

Updates the box border held by the AbstractBorders.

Declaration
public void SetBoxBorder(BorderStyle borderStyle, Color color)
Parameters
Type Name Description
BorderStyle borderStyle

The border style used by the operation.

Color color

The color used by the operation.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetDiagonalCrossBorder(BorderStyle)

Sets diagonal borders in both directions (X-shaped).

Declaration
public virtual void SetDiagonalCrossBorder(BorderStyle borderStyle)
Parameters
Type Name Description
BorderStyle borderStyle

The border style to apply.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetDiagonalCrossBorder(BorderStyle, SpreadsheetColor)

Sets diagonal borders in both directions with a specific spreadsheet color.

Declaration
public virtual void SetDiagonalCrossBorder(BorderStyle borderStyle, SpreadsheetColor color)
Parameters
Type Name Description
BorderStyle borderStyle

The border style to apply.

SpreadsheetColor color

The spreadsheet color.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetDiagonalCrossBorder(BorderStyle, Color)

Sets diagonal borders in both directions with a specific color.

Declaration
public virtual void SetDiagonalCrossBorder(BorderStyle borderStyle, Color color)
Parameters
Type Name Description
BorderStyle borderStyle

The border style to apply.

Color color

The border color.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetDiagonalDownBorder(BorderStyle)

Sets a diagonal border from bottom-left to top-right.

Declaration
public virtual void SetDiagonalDownBorder(BorderStyle borderStyle)
Parameters
Type Name Description
BorderStyle borderStyle

The border style to apply.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetDiagonalUpBorder(BorderStyle)

Sets a diagonal border from top-left to bottom-right.

Declaration
public virtual void SetDiagonalUpBorder(BorderStyle borderStyle)
Parameters
Type Name Description
BorderStyle borderStyle

The border style to apply.

Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetOutline(BorderStyle)

Sets only the outline edges to the same style with no explicit color. Equivalent to "Outside Borders" in the Excel UI.

Declaration
public void SetOutline(BorderStyle borderStyle)
Parameters
Type Name Description
BorderStyle borderStyle
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

SetOutline(BorderStyle, SpreadsheetColor)

Sets only the outline edges (left, top, right, bottom) to the same style and color, leaving inner/diagonal borders unchanged. Equivalent to "Outside Borders" in the Excel UI.

Declaration
public void SetOutline(BorderStyle borderStyle, SpreadsheetColor color)
Parameters
Type Name Description
BorderStyle borderStyle
SpreadsheetColor color
Remarks

AbstractBorders defines the common interface for border collections, including left, top, right, bottom, and diagonal borders. Derived classes include Borders and FormattableBorders.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX