New to Telerik Document Processing? Start a free 30-day trial

Border

Class

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.Documents.Flow.Model.Styles

Assembly:Telerik.Windows.Documents.Flow.dll

Syntax:

C#
[SuppressMessage("Microsoft.Design", "CA1036:OverrideMethodsOnComparableTypes")]
public class Border : IComparable<Border>

Inheritance: objectBorder

Implements: IComparable<Border>

Constructors

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

C#
public Border(Border border)
Parameters:borderBorder

The border.

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

C#
public Border(BorderStyle style)
Parameters:styleBorderStyle

The style.

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

C#
public Border(double thickness, BorderStyle style, ThemableColor color, bool shadow, bool frame, double spacing)
Parameters:thicknessdouble

The thickness.

styleBorderStyle

The style.

colorThemableColor

The color.

shadowbool

The shadow.

framebool

The frame.

spacingdouble

The spacing.

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

C#
public Border(double thickness, BorderStyle style, ThemableColor color)
Parameters:thicknessdouble

The thickness.

styleBorderStyle

The style.

colorThemableColor

The color.

Properties

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

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

The color.

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

C#
public bool Frame { get; }
Property Value:

The frame.

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

C#
public bool Shadow { get; }
Property Value:

The shadow.

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

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

The spacing.

Gets the visual pattern of the border line.

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

The style.

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

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

The thickness.

Methods

Compares a borders to another.

C#
public int CompareTo(Border other)
Parameters:otherBorder

The other.

Returns:

int

Implements: IComparable<Border>.CompareTo(Border)

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

Returns 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

Determines whether the specified borders are different.

C#
public static bool operator !=(Border first, Border second)
Parameters:firstBordersecondBorderReturns:

bool

True if the borders are different.

Determines whether the specified borders are equal.

C#
public static bool operator ==(Border first, Border second)
Parameters:firstBordersecondBorderReturns:

bool

True if the borders are equal.