Class
Border

Defines immutable border appearance settings including style, thickness, color, and optional effects for document elements. Use to configure borders on paragraphs, table cells, and other block-level content.

Definition

Namespace:Telerik.Windows.Documents.Flow.Model.Styles

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

cs-api-definition
[SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes")]
public class Border : IComparable<Border>

Inheritance: objectBorder

Implements: IComparable<Border>

Constructors

Border(Border)

Initializes a new instance of the Border class by copying settings from an existing border.

Declaration

cs-api-definition
public Border(Border border)

Parameters

border

Border

The border.

Border(BorderStyle)

Initializes a new instance of the Border class with the specified style and default thickness and color.

Declaration

cs-api-definition
public Border(BorderStyle style)

Parameters

style

BorderStyle

The style.

Border(double, BorderStyle, ThemableColor)

Initializes a new instance of the Border class with the specified thickness, style, and color.

Declaration

cs-api-definition
public Border(double thickness, BorderStyle style, ThemableColor color)

Parameters

thickness

double

The thickness.

style

BorderStyle

The style.

color

ThemableColor

The color.

Border(double, BorderStyle, ThemableColor, bool, bool, double)

Initializes a new instance of the Border class with full appearance control including optional shadow, frame, and spacing effects.

Declaration

cs-api-definition
public Border(double thickness, BorderStyle style, ThemableColor color, bool shadow, bool frame, double spacing)

Parameters

thickness

double

The thickness.

style

BorderStyle

The style.

color

ThemableColor

The color.

shadow

bool

The shadow.

frame

bool

The frame.

spacing

double

The spacing.

Properties

Color

Gets the border color, which may reference a document theme color.

Declaration

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

Property Value

ThemableColor

The color.

Frame

Gets a value indicating whether a frame effect is applied to the border.

Declaration

cs-api-definition
public bool Frame { get; }

Property Value

bool

The frame.

Shadow

Gets a value indicating whether a shadow effect is applied to the border.

Declaration

cs-api-definition
public bool Shadow { get; }

Property Value

bool

The shadow.

Spacing

Gets the spacing between the border and the content it surrounds, in device independent pixels.

Declaration

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

Property Value

double

The spacing.

Style

Gets the visual pattern of the border line.

Declaration

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

Property Value

BorderStyle

The style.

Thickness

Gets the width of the border line in device independent pixels.

Declaration

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

Property Value

double

The thickness.

Methods

CompareTo(Border)

Compares a borders to another.

Declaration

cs-api-definition
public int CompareTo(Border other)

Parameters

other

Border

The other.

Returns

int

Implements IComparable<Border>.CompareTo(Border)

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

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

Operators

operator !=(Border, Border)

Determines whether the specified borders are different.

Declaration

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

Parameters

first

Border

second

Border

Returns

bool

True if the borders are different.

operator ==(Border, Border)

Determines whether the specified borders are equal.

Declaration

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

Parameters

first

Border

second

Border

Returns

bool

True if the borders are equal.